Re: Large difference between elapsed time and run time for queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Large difference between elapsed time and run time for queries
Дата
Msg-id 19604.1047326874@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Large difference between elapsed time and run time for queries  ("Scott Buchan" <sbuchan@technicacorp.com>)
Список pgsql-performance
"Scott Buchan" <sbuchan@technicacorp.com> writes:
> I am simulating 200 user connections each running 6 select queries on 1
> indexed table with 50,000 records. The elapsed time for the queries average
> around 2.5 seconds while if I run the query using explain analyze while the
> test is running, the run time is around 300 ms although it takes much longer
> (few seconds) to display the results.

How many rows are these queries returning?  AFAICS the differential must
be the cost of transmitting the data to the frontend, which of course
does not happen when you use explain analyze.  (I think, but am not
completely sure, that explain analyze also suppresses the CPU effort of
converting the data to text form, as would normally be done before
transmitting it.  But given that you don't see a problem at 100
connections, that's probably not where the issue lies.)

> The database is being ran on a sunfire 880 with 4 750mhz
> processors with 8 G RAM running solaris 8

We have seen some other weird performance problems on Solaris (their
standard qsort apparently is very bad, for example).  Might be that you
need to be looking at kernel behavior, not at Postgres.

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Scott Buchan"
Дата:
Сообщение: Large difference between elapsed time and run time for queries
Следующее
От: Kevin Brown
Дата:
Сообщение: Re: Index / Performance issues