Example:
assume a table of 10 columns, three of which are fname, lname, and dob.
If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data' from table where fname = 'X'
and lname = 'Y') utilize the index?
thanks,
reid
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote:
Example:
assume a table of 10 columns, three of which are fname, lname, and dob.
If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data' from table where fname = 'X'
and lname =
Alvaro Herrera wrote:
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote:
Example:
assume a table of 10 columns, three of which are fname, lname, and
dob. If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data' from table where
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote:
assume a table of 10 columns, three of which are fname, lname, and dob.
If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data' from table where fname = 'X'
and lname = 'Y')
On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote:
Alvaro Herrera wrote:
Note that if your example query used the columns (lname, dob),
the answer would be no.
Why is that? In order to use an index, does the query have to utilize
the 'first' element of the index?
In released
On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote:
Alvaro Herrera wrote:
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote:
Example:
assume a table of 10 columns, three of which are fname, lname, and
dob. If an index is created on (fname, lname, dob), will a query
Alvaro Herrera [EMAIL PROTECTED] writes:
On Mon, Sep 12, 2005 at 09:43:57AM -0400, Reid Thompson wrote:
Example:
assume a table of 10 columns, three of which are fname, lname, and dob.
If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data'
Alvaro Herrera [EMAIL PROTECTED] writes:
On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote:
Why is that? In order to use an index, does the query have to utilize
the 'first' element of the index?
The leftmost part. There's no way to scan an index if you don't know
the key. On a
Greg Stark suggests here:
http://archives.postgresql.org/pgsql-hackers/2005-05/msg00966.php
that GiST could also be fixed to work with any subset of the index
columns, but it hasn't been done yet, unless Teodor and Oleg snuck
something in during that last round of GiST work.
GiST may work with
Tom Lane [EMAIL PROTECTED] writes:
Alvaro Herrera [EMAIL PROTECTED] writes:
Yes, if it is selective enough. (It _can_ use the index, which does not
mean that it _will_ use it.) Note that if your example query used the
columns (lname, dob), the answer would be no.
Actually, that last
Teodor Sigaev [EMAIL PROTECTED] writes:
GiST may work with any subset of index columns too. Even in existing code I
don't see any problem except NULL in a first column. GiST doesn't store
tuples
with leading NULL value (gist.c lines 174, 326), so index doesn't contained
them.
Well,
Greg Stark [EMAIL PROTECTED] writes:
Tom Lane [EMAIL PROTECTED] writes:
http://archives.postgresql.org/pgsql-committers/2005-06/msg00156.php
Did that patch actually implement skip scanning?
No, it just removed the planner's arbitrary assumption that the index
methods wouldn't cope. Skip
12 matches
Mail list logo