Re: [HACKERS] \dt and disk access

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] \dt and disk access
Дата
Msg-id 4ad3422050a4cbfc7e2aa8b90ecf6a3d
обсуждение исходный текст
Ответ на [HACKERS] \dt and disk access  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
>
> 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 по дате отправления: