On Wed, 12 May 1999, Tom Lane wrote:
> I'm guessing you might be compiling with LOCALE support turned on?
Unfortunately not. I run ./configure --prefix=/home/postgres so that
wouldn't be the case.
> The parser's hack to make LIKE comparisons indexable is only half
> functional in that case, since you get the >= comparison but not the <=
> one. Given the small size of your tables, the optimizer is probably
> estimating that an index scan isn't going to be selective enough to
> justify its extra cost.
Then postgres is not guessing right. Even tho the table only has
~200 rows, the query still takes forever to finish. I have let it go for
a few minutes, and it still wasn't done.. I suppose that would be because
it's doing a seq scan on the inventorysuppliers table for EACH hit in the
av_parts table. That's bound to be slow :)
> FWIW, I do get an index scan plan on an attempt to duplicate this
> case... but I'm not using LOCALE.
Weird. I'll have to look at it more.
Thanks,
Ole Gjerde