Обсуждение: about "explain analyze" cannot get detailed analyzed results for queries in a plpgsql function

Поиск
Список
Период
Сортировка
Hello,

I am using postgresql 8.0.1. I have a function (Pl/PgSQL) created with
serveral complex queries inside. For example,


create function f1() return void...
begin
...
query 1: insert into ... from A left join B... left join C where ...

query 2: update T1 set ... from (X left join Y .. left join Z .. ) AS M
where M.pkcols = T.pkcols...

query 3:
...
query 10: ...
...
end;


If I ran explain analyze f1(), I only get the total time, but not the
detail analyzed results. Is there a way I can get the detailed  analyzed
results for all queries in the function?

If all queries in the function are not optimized by postgresql, may I
get more detail inputs about the reason please?

Thanks a lot!
Ying