From: | Prasanth <dbadmin(at)nqadmin(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: using greater than or less than vs equals in where condition |
Date: | 2005-05-13 15:27:53 |
Message-ID: | 4284C779.9090500@nqadmin.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Yes most of the data has type_code =2 probably 99.9%.
Thanks,
-Prasanth.
Tom Lane wrote:
> Prasanth <dbadmin(at)nqadmin(dot)com> writes:
>
>>PG Version: 7.4.7
>
>
>>explain analyze select * from data where type_code >'2' AND type_code<'4';
>>[ is slow ]
>>explain analyze select * from data where type_code = '3';
>>[ isn't ]
>
>
> Are there a whole lot of rows with type_code = 2? If so, this is
> fixed in 8.0.
>
> 2003-12-20 20:23 tgl
>
> * src/: backend/access/nbtree/nbtinsert.c,
> backend/access/nbtree/nbtpage.c, backend/access/nbtree/nbtsearch.c,
> include/access/nbtree.h: Improve btree's
> initial-positioning-strategy code so that we never need to step
> more than one entry after descending the search tree to arrive at
> the correct place to start the scan. This can improve the behavior
> substantially when there are many entries equal to the chosen
> boundary value. Per suggestion from Dmitry Tkach, 14-Jul-03.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Saulius Malakauskas | 2005-05-13 16:15:45 | Problem with pltcl trigger |
Previous Message | Jags | 2005-05-13 14:45:48 | problems after upgrading to 7.4.5 |