Re: select count() out of memory

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: select count() out of memory
Дата
Msg-id 20071026105824.GB27400@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: select count() out of memory  (Thomas Finneid <tfinneid@student.matnat.uio.no>)
Ответы Re: select count() out of memory  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
On Fri, Oct 26, 2007 at 08:25:09AM +0200, Thomas Finneid wrote:
> Gregory Stark wrote:
> >Tom's point is that if you have 55k tables then just *finding* the newest
> >child table is fairly expensive. You're accessing a not insignificant-sized
> >index and table of tables. And the situation is worse when you consider the
> >number of columns all those tables have, all the indexes those tables have,
> >all the column keys those indexes the tables have have, etc.
>
> Yes, I got that. But I name the child tables so that I when my server
> receives read requests, I retreive details from the request to be able
> to figure out the exact child table name, without the system needing to
> do any internal searches to find the newest table.

I think the lookup that is being referred to is the fact that if you've
got 55k (plus) files in a directory then the filesystem still has to
perform a search in the directory to locate the actual file associated
with the filename.  There probably isn't going to be much difference
between the filesystem performing this lookup vs the database descending
a few levels of its index structure.

I have a feeling you may have thought about this before, but thought it
wouldn't hurt to point it out more explicitly.


  Sam

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: INDEX and JOINs
Следующее
От: Reg Me Please
Дата:
Сообщение: Re: INDEX and JOINs