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

From Igor
Subject Re: [HACKERS] \dt and disk access
Date
Msg-id 67e8a64ebfa941bacd6eb9d4d0f1a00e
Whole thread Raw
In response to [HACKERS] \dt and disk access  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Well....Is the sorting algorithm using temp files to do the sorting? If
not, it would be interesting to see the difference in Purify output when
running an identical query with sorting and without...
I'll probably run it on Saturday that way just to (hopefully) eliminate
leaks and such from possible causes...

=+=------------------------/\---------------------------------=+=
       Igor Natanzon      |**|   E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=

On Sat, 21 Jun 1997, Bruce Momjian wrote:

> >
> > Can someone suggest why running the \dt comand in psql causes so many
> > disk accesses?
> >
> > I am seeing some queries causing a lot of disk access that doesn't make
> > sense to me.
> >
> > I am running my server with fsync off.
>
> I now realize the unusual disk activity is caused by any query that uses
> an ORDER BY.  A query that returns three rows takes MUCH longer with the
> ORDER BY than without it, 0.20 seconds vs. 0.61 seconds, three times
> longer.
>
> The query is:
>
>     select * from matter
>
> AND
>
>     select * from matter order by matter
>
> The table has three short text columns.
>
>
> Would anyone like to comment on why ORDER BY is doing this?  It
> certainly slows down the query.  I am running BSD/OS.
>
> This is of course using PostgreSQL 6.1.
>
> --
> Bruce Momjian
> maillist@candle.pha.pa.us
>

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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] \dt and disk access
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] Postgres v6.x-v7.0 roadmap