From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Daniel Kalchev <daniel(at)digsys(dot)bg>, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem |
Date: | 1999-06-10 00:51:04 |
Message-ID: | 199906100051.UAA14533@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> LIKE doesn't know anything about indexes, nor vice versa. What the
> index-scan machinery *does* know about is <, <=, etc. If you have
> WHERE clauses like "x >= 33" and "x <= 54" then an index scan knows
> to only scan the part of the index from 33 to 54. So you never even
> visit a large fraction of the table. This is why an index scan can
> be faster than a sequential scan even though the per-tuple overhead
> of consulting the index is larger.
>
You know, everyone beats me up for that LIKE indexing hack, but every
month that goes by where someone does not come up with a better solution
makes me feel a little better about the criticism.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-06-10 00:54:38 | Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem |
Previous Message | Bruce Momjian | 1999-06-10 00:44:48 | Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem |