Re: sequential explain analyze command execution

Поиск
Список
Период
Сортировка
От Marcelo Sena
Тема Re: sequential explain analyze command execution
Дата
Msg-id CAPmRTtPM7KJ7muW60ay-FVkTwPqj=E3iOnniGfmC07YtgAi6GA@mail.gmail.com
обсуждение исходный текст
Ответ на sequential explain analyze command execution  (michel wildcat <m.wildcat82@gmail.com>)
Список pgsql-novice
Your first email was arrived correctly. There was no need for a second one.

As for the query you could do something like

explain analyze select *
from (query1) as q1, (query2) as q2, ... (queryN) as qN;

But that might incur in a lot of memory swapping if you select a bunch of rows in some of these queries.

An alternative is doing something like

create function myquerytest() returning integer as $$
   query1
   query2
   ...
   queryN
   select 1;
$$ language sql;

explain analyze select myquerytest();

drop function myquerytest();

In either case I would put the code in a file and then "give" it to psql using the -f option and set the -o option to the desired output file . Since you are using pgadmin3 I have no idea.

good luck,
Marcelo Lacerda


On Sat, May 19, 2012 at 5:20 AM, michel wildcat <m.wildcat82@gmail.com> wrote:
hello,
I am working with PostgreSQL 9 in windows (pgAdmin3) and I'm trying to
execute distinct EXPLAIN ANALYZE command on some queries that are
really time consumming, and send the results to a single file.
can anybody help me to solve this please?
thanks

--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

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

Предыдущее
От: michel wildcat
Дата:
Сообщение: sequential explain analyze command execution
Следующее
От: michel wildcat
Дата:
Сообщение: Fwd: sequential explain analyze command execution