Re: using an index worst performances

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: using an index worst performances
Дата
Msg-id 41261E41.3080204@bigfoot.com
обсуждение исходный текст
Ответ на Re: using an index worst performances  (Rod Taylor <pg@rbt.ca>)
Ответы Re: using an index worst performances
Список pgsql-performance
Rod Taylor wrote:

> On Fri, 2004-08-20 at 05:37, Gaetano Mendola wrote:
>
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Christopher Kings-Lynne wrote:
>>
>>|>>> Without index: 1.140 ms
>>|>>> With index: 1.400 ms
>>|>>> With default_statistic_targer = 200:   1.800 ms
>>|>>
>>|>>
>>|>>
>>|>>
>>|>> Can I just check that 1.800ms means 1.8 secs (You're using . as the
>>|>> thousands separator)?
>>|>>
>>|>> If it means 1.8ms then frankly the times are too short to mean
>>|>> anything without running them 100 times and averaging.
>>|>
>>|>
>>|>
>>|>
>>|> It mean 1.8 ms and that execution time is sticky to that value even
>>|> with 1000 times.
>>|
>>|
>>| Given the almost irrelvant difference in the speed of those queries, I'd
>>| say that with the stats so high, postgres simply takes longer to check
>>| the statistics to come to the same conclusion.  ie. it has to loop over
>>| 200 rows instead of just 10.
>>
>>The time increase seems too much.
>
>
> We can test this.
>
> What are the times without the index, with the index and with the higher
> statistics value when using a prepared query?

Using a prepared query:

Without index and default stat 10 :    1.12 ms
Without index and default stat 1000 :  1.25 ms
With index and default stat 10:        1.35 ms
With index and default stat 1000:      1.6 ms

that values are the average obtained after the very first one,
on 20 execution.



Regards
Gaetano Mendola

























В списке pgsql-performance по дате отправления:

Предыдущее
От: "Leeuw van der, Tim"
Дата:
Сообщение: Re: I could not get postgres to utilizy indexes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: using an index worst performances