Re: select count() out of memory

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: select count() out of memory
Дата
Msg-id 20071026144959.GD27400@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: select count() out of memory  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
On Fri, Oct 26, 2007 at 02:21:39PM +0100, Gregory Stark wrote:
> "Sam Mason" <sam@samason.me.uk> writes:
> > 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.
>
> That's true but it's in *addition* to the database having to find the catalog
> records for the table which involves an index lookup itself.
>
> Actually many index lookups since it has to look up the catalog record for the
> table, for all the columns of the table, for all indexes of the table, for all
> the index keys of those indexes, all constraints of the table, all triggers of
> the table, all dependencies on other objects and of other objects on this
> table (this latter is why I suggest not using inheritance).

OK, sounds pretty horrible to contemplate.  If most of the queries
are to the same table (sounds like they will be) then the relavant
information will remain resident in memory won't it?


  Sam

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

Предыдущее
От: "Vince Negri"
Дата:
Сообщение: Re: TRUNCATE - timing of the return of disk space - caused by long-lived client?
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: subversion support?