Re: Copy command Faster than original select

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Copy command Faster than original select
Дата
Msg-id
26997.1423237712@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Copy command Faster than original select belal <belalhamed@gmail.com>
Re: Copy command Faster than original select Tom Lane <tgl@sss.pgh.pa.us>
Re: Copy command Faster than original select Igor Neyman <ineyman@perceptron.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Pavel Stehule <pavel.stehule@gmail.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Pavel Stehule <pavel.stehule@gmail.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Pavel Stehule <pavel.stehule@gmail.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Pavel Stehule <pavel.stehule@gmail.com>
Re: Copy command Faster than original select Matheus de Oliveira <matioli.matheus@gmail.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Matheus de Oliveira <matioli.matheus@gmail.com>
Re: Copy command Faster than original select Belal Al-Hamed <belalhamed@gmail.com>
Re: Copy command Faster than original select Pavel Stehule <pavel.stehule@gmail.com>
Re: Copy command Faster than original select Matheus de Oliveira <matioli.matheus@gmail.com>
belal  writes:
> I made complex select using PGAdmin III Query Editor, Postgre server 9.3
> select ... from mytable join .. join ... order by ....
> I get [Total query runtime: 8841 ms. 43602 rows retrieved.]

> but when I use 
> copy ([same above select]) to '/x.txt' 
> I get [Query returned successfully: 43602 rows affected, 683 ms execution
> time.]

> these test made on the same machine as the postgresql server.

> can anyone explain huge difference in executing time?

It's the time needed for PGAdmin to receive and display 43602 data rows,
likely.  PGAdmin has a reputation of not being too speedy at that.

You could check this by trying some other client such as psql.  Even
in psql, the formatting options you use can make a very large difference
in how fast it is.  However, I think psql's \timing option measures just
the server roundtrip time and not the time taken after that to format and
display the query result.  PGAdmin is probably measuring the query time
differently.

			regards, tom lane

В списке pgsql-performance по дате отправления
От: Igor Neyman
Дата:
От: Belal Al-Hamed
Дата:
FAQ