| От | Chris Jones |
|---|---|
| Тема | Re: Re: Query not using index |
| Дата | |
| Msg-id | 20010510153418.G26743@mt.sri.com обсуждение исходный текст |
| Ответ на | Re: Re: Query not using index (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Re: Query not using index
Re: Query not using index |
| Список | pgsql-general |
On Thu, May 10, 2001 at 05:22:07PM -0400, Tom Lane wrote:
> ryan@paymentalliance.net writes:
> > No the query usually returns between 0 and 5 rows. Usually not zero -
> > most often 1.
>
> Ah. You must have a few values that are far more frequent (like tens of
> thousands of occurrences?) and these are throwing off the planner's
> statistics.
I had a similar situation, where I had a lot of rows with 0's in
them. Changing those to NULLs worked wonders. The planner (or
statistics gatherer, or something) apparently takes notice of the
distribution of non-NULL values.
Chris
--
chris@mt.sri.com -----------------------------------------------------
Chris Jones SRI International, Inc.
www.sri.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера