pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Matteo Beccati <php@beccati.com>
Cc: Andrea Arcangeli <andrea@cpushare.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: NOT LIKE much faster than LIKE?
Date: Tue, 10 Jan 2006 22:40:30 -0500
Message-ID: <7924.1136950830@sss.pgh.pa.us> (raw)
In-Reply-To: <1136936205.21025.507.camel@localhost.localdomain>
References: <20060110014447.GB18474@opteron.random>
	<24021.1136858688@sss.pgh.pa.us>
	<20060110022303.GA20168@opteron.random>
	<24372.1136861684@sss.pgh.pa.us>
	<43C3799D.5030103@beccati.com>
	<1625.1136915395@sss.pgh.pa.us>
	<1136930796.21025.486.camel@localhost.localdomain>
	<6398.1136931685@sss.pgh.pa.us>
	<1136936205.21025.507.camel@localhost.localdomain>

Simon Riggs <simon@2ndquadrant.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



view thread (26+ messages)  latest in thread

Message-ID: <7924.1136950830@sss.pgh.pa.us>
Permalink:  ../7924.1136950830@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7924.1136950830@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, php@beccati.com, andrea@cpushare.com
  Subject: Re: NOT LIKE much faster than LIKE?
  In-Reply-To: <7924.1136950830@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox