Re: [PERFORM] Like 'name%' is not using index

2006-03-02 Thread Greg Stark
"Jozsef Szalay" <[EMAIL PROTECTED]> writes: > One would > think that Postgres will use the index to look up the matches, but > apparently that is not the case. It performs a full table scan. My > query looks something like this: > > SELECT * FROM table WHERE name LIKE 'smith%'; There are two p

Re: [PERFORM] Like 'name%' is not using index

2006-03-02 Thread Jozsef Szalay
The var_char_pattern_ops operator group has made the difference. Thanks for the help! Jozsef -Original Message- From: Mark Kirkwood [mailto:[EMAIL PROTECTED] Sent: Thursday, March 02, 2006 7:29 PM To: Jozsef Szalay Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Like 'name%'

Re: [PERFORM] Like 'name%' is not using index

2006-03-02 Thread Mark Kirkwood
Jozsef Szalay wrote: Hi all, I have to provide a pretty standard query that should return every row where the NAME attribute begins with a specific string. The type of the NAME column is varchar. I do have an index for this column. One would think that Postgres will use the index to look u

[PERFORM] Like 'name%' is not using index

2006-03-02 Thread Jozsef Szalay
Hi all,   I have to provide a pretty standard query that should return every row where the NAME attribute begins with a specific string. The type of the NAME column is varchar. I do have an index for this column. One would think that Postgres will use the index to look up the matches, but

Re: [HACKERS] qsort again (was Re: [PERFORM] Strange Create Index behaviour)

2006-03-02 Thread Bruce Momjian
Added to TODO: * Improve port/qsort() to handle sorts with 50% unique and 50% duplicate value [qsort] This involves choosing better pivot points for the quicksort. --- Dann Corbit wrote: > >