Re: Unused index influencing sequential scan plan
| От | Tom Lane | 
|---|---|
| Тема | Re: Unused index influencing sequential scan plan | 
| Дата | |
| Msg-id | 102.1350578667@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Unused index influencing sequential scan plan (Thom Brown <thom@linux.com>) | 
| Ответы | 
                	
            		Re: Unused index influencing sequential scan plan
            		
            		 | 
		
| Список | pgsql-performance | 
Thom Brown <thom@linux.com> writes:
> I've created a test table containing 21 million random dates and
> times, but I get wildly different results when I introduce a
> functional index then ANALYSE again, even though it doesn't use the
> index:
As Peter said, the existence of the index causes ANALYZE to gather stats
about the expression, which will affect rowcount estimates whether or
not the planner chooses to use the index.
> And as a side note, how come it's impossible to get the planner to use
> an index-only scan to satisfy the query (disabling sequential and
> regular index scans)?
Implementation restriction - we don't yet have a way to match index-only
scans to expressions.
            regards, tom lane
		
	В списке pgsql-performance по дате отправления: