Well, in case you are wondering.....I populated a table with about 500
tuples.
Running select * on that table yealded no errors from purify..
Running select * .. order by (a non-indexed field) gave the following:
total memory usage: 319,803 bytes.
Of this amount of memory, 57,344 bytes were leaks.
I then populated another table with 2600+ tuples.
These are the results with order by:
Total memory used: 786,763
Of this memory, 524,288 bytes are memory leaks!!! Waste of half a meg of
ram on 2600 or so tuples is bad....And what if you have 20,000 tuples? Or
a 100,000 ?
I will try to investigate this matter now....
=+=------------------------/\---------------------------------=+=
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
>
------------------------------