Re: [HACKERS] \dt and disk access - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] \dt and disk access
Date
Msg-id 5b19c2d915022f7c764946c9991be225
Whole thread Raw
In response to [HACKERS] \dt and disk access  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
>
> On Sun, 22 Jun 1997, Bruce Momjian wrote:
>
> > >     My next question is what is considered a 'small SELECT result'?  If
> > > I have a 32Meg machine, that 'small' would be different, I would assume,
> > > then a 128Meg machine.
> >
> > I think the sort is used by ORDER BY and joins where this is not an
> > existing index.
>
>     Ummm...okay.
>
>     Now, what is considered a "small SELECT result"? :)

I don't know yet.  Any sort that will not fix in physical memory should
use the default psort() code, because it prevents the thrashing of
moving data in and out of virtial memory (SWAP) while the sort is being
performed.  It is hard to determine what would fix in PHYSICAL, not
virtual memory, and in fact this number changes depending on how busy
the machine is.


>
> > >     With that in mind, how about some sort of 'switch', similar to
> > > -B, that allows you to stipulate total RAM of a machine (or virtual memory?),
> > > or something similar to that?
> >
> > I am not sure how to do this.  There is sysctl() and getconf(), but
> > neither of them is standard on all platforms.
>
>     Huh?  You seem to have totally missed the question on that one
> there Bruce :(  Where does sysctl() and getconf() fit into having a run
> time switch? *confused look* *grin*

Yes, I guess we will just have to make this a run-time switch, though
keying in on -B may be a good idea, that way they have only one thing to
tune.


- --
Bruce Momjian
maillist@candle.pha.pa.us


------------------------------

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] \dt and disk access
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] \dt and disk access