Re: statistics target for columns in unique constraint?
| От | Marti Raudsepp | 
|---|---|
| Тема | Re: statistics target for columns in unique constraint? | 
| Дата | |
| Msg-id | CABRT9RBwmDxjq-tzLMh6rFX-suJYVQMiGSQAADsueg07rvB1dg@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | statistics target for columns in unique constraint? (ach <alanchines@gmail.com>) | 
| Ответы | 
                	
            		Re: statistics target for columns in unique constraint?
            		
            		 | 
		
| Список | pgsql-performance | 
On Mon, May 13, 2013 at 6:01 PM, ach <alanchines@gmail.com> wrote: > what I'm wondering is, since > the unique constraint already covers the whole table and all rows in > entirety, is it really necessary for statistics to be set that high on > those? AFAIK if there are exact-matching unique constraints/indexes for a query's WHERE clause, the planner will deduce that the query only returns 1 row and won't consult statistics at all. > Or does that only serve to slow down inserts to that table? It doesn't slow down inserts directly. Tables are analyzed in the background by autovacuum. However, I/O traffic from autovacuum analyze may slow down inserts running concurrently. Regards, Marti
В списке pgsql-performance по дате отправления: