Re: select count() out of memory

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select count() out of memory
Date: 2007-10-26 14:49:59
Message-ID: 20071026144959.GD27400@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 26, 2007 at 02:21:39PM +0100, Gregory Stark wrote:
> "Sam Mason" <sam(at)samason(dot)me(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-10-26 14:54:50 Re: subversion support?
Previous Message Tino Wildenhain 2007-10-26 14:43:30 Re: subversion support?