Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-08 Thread Martijn van Oosterhout
On Wed, Feb 08, 2006 at 06:02:08PM +0100, Dick Kniep wrote: > On Wednesday 08 February 2006 06:18, Tom Lane wrote: > > Dick Kniep <[EMAIL PROTECTED]> writes: > > > Does this also affect if you have many NULL values in the key? So testing > > > Not is NULL would also be affected? > > > > IS NOT NULL

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-08 Thread Greg Stark
Dick Kniep <[EMAIL PROTECTED]> writes: > Does this mean that if you have a table that has many rows, and 95% of the > rows contain a NULL value for a field, that indexing will be useless, because > it will always do a tablescan? Any time you have 95% of the rows of the table with the same valu

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-08 Thread Dick Kniep
On Wednesday 08 February 2006 06:18, Tom Lane wrote: > Dick Kniep <[EMAIL PROTECTED]> writes: > > Does this also affect if you have many NULL values in the key? So testing > > Not is NULL would also be affected? > > IS NOT NULL isn't an indexable operation, so your question doesn't really > apply :

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread Tom Lane
Dick Kniep <[EMAIL PROTECTED]> writes: > Does this also affect if you have many NULL values in the key? So testing Not > is NULL would also be affected? IS NOT NULL isn't an indexable operation, so your question doesn't really apply :-( regards, tom lane -

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread Dick Kniep
Hi list, Does this also affect if you have many NULL values in the key? So testing Not is NULL would also be affected? Cheers, Dick Kniep On Tuesday 07 February 2006 23:13, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > Quoting Tom Lane <[EMAIL PROTECTED]>: > >> In 8.0, the descent code can do

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread Tom Lane
[EMAIL PROTECTED] writes: > Quoting Tom Lane <[EMAIL PROTECTED]>: >> In 8.0, the descent code can do >> either "first entry >= X" or "first entry > X", and the positioning >> rules never need to step more than one entry to locate the desired >> starting position (details left as exercise for the re

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread jao
Quoting Tom Lane <[EMAIL PROTECTED]>: [EMAIL PROTECTED] writes: In the 8.0 release notes, (section E.10.4.1), I noticed this statement: Improve B-tree index performance for duplicate keys (Dmitry Tkach, Tom) This improves the way indexes are scanned when many duplicate values

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread Tom Lane
[EMAIL PROTECTED] writes: > In the 8.0 release notes, (section E.10.4.1), I noticed this > statement: > Improve B-tree index performance for duplicate keys (Dmitry Tkach, Tom) > This improves the way indexes are scanned when many duplicate > values exist in the index. > Can someone d

[GENERAL] B-tree performance improvements in 8.x

2006-02-07 Thread jao
I'm currently running postgresql 7.4.8. Our two biggest tables have indexes on (x, y), where x, y are integers, and there are often many y values per x value. The ratio can be anywhere from 1:1 to 20:1. In the 8.0 release notes, (section E.10.4.1), I noticed this statement: Improve B-tree