Re: [PATCHES] Minimum selectivity estimate for LIKE 'prefix%'
В списке pgsql-hackers по дате отправления:
| От | Peter Eisentraut |
|---|---|
| Тема | Re: [PATCHES] Minimum selectivity estimate for LIKE 'prefix%' |
| Дата | |
| Msg-id | 200803311202.47718.peter_e@gmx.net обсуждение исходный текст |
| Ответы |
Re: [PATCHES] Minimum selectivity estimate for LIKE 'prefix%'
|
| Список | pgsql-hackers |
Am Donnerstag, 6. März 2008 schrieb Tom Lane: > What I propose doing about this is a small variant on Peter's original > suggestion: compute the estimated selectivity for > col = 'prefix' > and clamp the result of prefix_selectivity to be at least that. OK, first results with this patch are in: The selectivity estimations are adjusted nicely, but the cost calculation doesn't change at all. Before: Index Scan using foo_idx_3 on foo foo (cost=0.01..6.03 rows=1 width=8) After: Index Scan using foo_idx_3 on foo foo (cost=0.01..6.03 rows=627 width=8) How is that possible? Btw., the corresponding query plan for the LIKE 'constant' case is: Index Scan using foo_idx_3 on foo foo (cost=0.00..2527.84 rows=627 width=8) This is what we had hoped to get in the "after" case.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера