From: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
---|---|
To: | Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu> |
Cc: | Mark Butler <butlerm(at)middle(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Indexes not used in 7.1RC4: Bug? |
Date: | 2001-04-11 15:07:32 |
Message-ID: | 3AD47334.25B9AC9A@alumni.caltech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> What about going the other way around... Promote the int2 to an int4
> (lossless). Actually for all int1,int2 datatypes (regardless of whether it
> was the constant or the column) you could promote all to a common int4 and
> then do comparisons.
That is why the index is not used: the backend is promoting all of the
int2 column values to
int4 for the comparison, and concludes that the available index is not
relevant.
The index traversal code would need to know how to promote individual
values in the index for comparison, which is an interesting idea but I
haven't thought about how efficient it would be. Clearly the cost would
be different than a simple comparison.
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | newsreader | 2001-04-11 15:16:45 | Re: run both 7.0.3 and 7.1 |
Previous Message | Thomas F. O'Connell | 2001-04-11 15:03:37 | Re: Inheritance and referential integritry in 7.0.3 |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-04-11 15:15:18 | age() function documentation |
Previous Message | Vince Vielhaber | 2001-04-11 14:59:17 | Re: Re: HOLD THE PRESSES!! ... pg_dump from v7.0.3 can't import to v7.1? |