Re: how fast index works?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: how fast index works?
Дата
Msg-id CAHyXU0wgqZ6V5MR+n4Yzt9=VQ_ccU_kuPm8WdgGWjeywvzA0HQ@mail.gmail.com
обсуждение исходный текст
Ответ на how fast index works?  ("Anibal David Acosta" <aa@devshock.com>)
Список pgsql-performance
On Tue, Sep 6, 2011 at 1:31 PM, Anibal David Acosta <aa@devshock.com> wrote:
> Hi everyone,
>
>
>
> My question is, if I have a table with 500,000 rows, and a SELECT of one row
> is returned in 10 milliseconds, if the table has 6,000,000 of rows and
> everything is OK (statistics, vacuum etc)
>
> can i suppose that elapsed time will be near to 10?

The problem with large datasets does not come from the index, but that
they increase cache pressure.  On today's typical servers it's all
about cache, and the fact that disks (at least non ssd drives) are
several orders of magnitude slower than memory.  Supposing you had
infinite memory holding your data files in cache or infinitely fast
disks, looking up a record from a trillion record table would still be
faster than reading a record from a hundred record table that had to
fault to a spinning disk to pull up the data.

merlin

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: how delete/insert/update affects select performace?
Следующее
От: "Anibal David Acosta"
Дата:
Сообщение: Re: how delete/insert/update affects select performace?