Re: Query Optimizer makes a poor choice
| От | Tomas Vondra |
|---|---|
| Тема | Re: Query Optimizer makes a poor choice |
| Дата | |
| Msg-id | 4ED55A7F.3010306@fuzzy.cz обсуждение исходный текст |
| Ответ на | Re: Query Optimizer makes a poor choice ("Tyler Hains" <thains@profitpointinc.com>) |
| Ответы |
Re: Query Optimizer makes a poor choice
|
| Список | pgsql-general |
Hi, what PostgreSQL version is this? That's the first thing we need to know. On 29.11.2011 22:28, Tyler Hains wrote: > Yes, I'm pretty sure autovacuum is enabled. Changing the query as shown > there uses the sub-optimal index. That doesn't mean > I haven't had a chance to experiment with the SET STATISTICS, but that > got me going on something interesting... If you execute this SELECT count(*) FROM cards WHERE card_set_id=2850; what number do you get? How far is that from 27616, expected by the planner? > Do these statistics look right? No idea, that depends on your data set. And you've missed the most_common_freqs so it's almost impossible to analyze the stats. Tomas
В списке pgsql-general по дате отправления: