Re: NOT LIKE much faster than LIKE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Matteo Beccati <php(at)beccati(dot)com>, Andrea Arcangeli <andrea(at)cpushare(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: NOT LIKE much faster than LIKE?
Date: 2006-01-11 03:40:30
Message-ID: 7924.1136950830@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> I meant use the same sampling approach as I was proposing for ANALYZE,
> but do this at plan time for the query. That way we can apply the
> function directly to the sampled rows and estimate selectivity.

I think this is so unlikely to be a win as to not even be worth spending
any time discussing. The extra planning time across all queries will
vastly outweigh the occasional improvement in plan choice for some
queries.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Lang 2006-01-11 03:50:46 Re: How to handle a large DB and simultaneous accesses?
Previous Message Dave Dutcher 2006-01-11 02:06:08 Left Join Performance vs Inner Join Performance