Re: Idea about estimating selectivity for single-column expressions
От | Greg Stark |
---|---|
Тема | Re: Idea about estimating selectivity for single-column expressions |
Дата | |
Msg-id | 407d949e0908190716i42de4b4eq169a9572529d34f2@mail.gmail.com обсуждение исходный текст |
Ответ на | Idea about estimating selectivity for single-column expressions (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Idea about estimating selectivity for single-column expressions
Re: Idea about estimating selectivity for single-column expressions |
Список | pgsql-hackers |
On Wed, Aug 19, 2009 at 3:53 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote: > * The expression might throw an error for some inputs, for instance > (1 / field) < 0.5 > which would fail on zero. We could recover by wrapping the whole > estimation process in a subtransaction, but that seems really expensive. > I thought about arguing that the failure would happen anyway at runtime, > but that doesn't hold water --- for example, the user might have just > deleted all the rows with field = 0, and would have grounds to complain > if the query failed; but there would still be an entry for zero in the > histogram. We could add another flag in pg_proc for functions which cannot throw an error. Perhaps all index operator class operators be required to use such functions too? -- greg http://mit.edu/~gsstark/resume.pdf
В списке pgsql-hackers по дате отправления: