Re: NOT LIKE much faster than LIKE?

Stephan Szabo <sszabo@megazone.bigpanda.com>

From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Andrea Arcangeli <andrea@cpushare.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-performance@postgresql.org
Date: 2006-01-10T02:54:57Z
Lists: pgsql-performance
On Tue, 10 Jan 2006, Andrea Arcangeli wrote:

> I see. I can certainly fix it by stopping using LIKE. But IMHO this
> remains a bug, since until the statistics about the numberof matching
> rows isn't estimated well, you should not make assumptions on LIKE/NOT
> LIKE. I think you can change the code in a way that I won't have to
> touch anything, and this will lead to fewer surprises in the future IMHO.

I doubt it, since I would expect that this would be as large a
pessimization for a larger fraction of people than it is an optimization
for you.