| От | Greg Stark |
|---|---|
| Тема | Re: NOT LIKE much faster than LIKE? |
| Дата | |
| Msg-id | 87y81oyv6x.fsf@stark.xeocode.com обсуждение исходный текст |
| Ответ на | Re: NOT LIKE much faster than LIKE? (Andrea Arcangeli <andrea@cpushare.com>) |
| Список | pgsql-performance |
Andrea Arcangeli <andrea@cpushare.com> writes: > Fixing this with proper stats would be great indeed. What would be the > most common value for the kernel_version? You can see samples of the > kernel_version here http://klive.cpushare.com/2.6.15/ . That's the > string that is being searched against both PREEMPT and SMP. Try something like this where attname is the column name and tablename is, well, the tablename: db=> select most_common_vals from pg_stats where tablename = 'region' and attname = 'province'; most_common_vals ------------------ {ON,NB,QC,BC} Note that there's a second column most_common_freqs and to do this would really require doing a weighted average based on the frequencies. -- greg
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера