Re: query plan with index having a btrim is different for strings of different length
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: query plan with index having a btrim is different for strings of different length |
| Дата | |
| Msg-id | 9070.1228954108@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: query plan with index having a btrim is different for strings of different length (Richard Yen <dba@richyen.com>) |
| Ответы |
Re: query plan with index having a btrim is different for strings of different length
|
| Список | pgsql-performance |
Richard Yen <dba@richyen.com> writes:
> Is there any way to tune this so that for the common last names, the query
> run time doesn't jump from <1s to >300s?
Well, as near as I can tell there's factor of a couple hundred
difference between the frequencies of 'smith' and 'smithers', so
you shouldn't really expect similar runtimes for the two cases.
Having said that, I still think you should try to index both first
and last name. Also I wonder whether the index on owner is worth
having at all. It definitely doesn't seem worthwhile to index the
entries with owner = -1, since there are so many; so maybe you could
make it a partial index that excludes those entries, in order to prevent
the planner from trying to use it for this case.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера