Sending Explain output to a perl client

Sending Explain output to a perl client

Post by wshel.. » Thu, 06 Dec 2001 03:33:39



Hi,

I'm trying to tune a query that includes a correlated subquery, by moving the
subquery to a temporary table and joining on that, hoping to improve things by
not executing the subquery for every row. My immediate problem is that since the
temporary table is session specific and I'm running it from perl, I can't paste
the SQL into a psql session to run EXPLAIN on it. Can I treat the EXPLAIN
results like a column from a regular result set and have perl retrieve it like a
regular column value, or is there another way to capture the EXPLAIN output from
a perl client?

Many thanks,

Wes Sheldahl

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 
 
 

Sending Explain output to a perl client

Post by Tom La » Thu, 06 Dec 2001 03:54:56



> or is there another way to capture the EXPLAIN output from
> a perl client?

If you don't want to tweak the DBD driver, you could just read the
explain results in the postmaster's log.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command


 
 
 

1. Set explain output

All

Does anybody know if it is possible to construct a report similar to
that produced by set explain using the sysmaster tables in V7?

I know that some of the information is available there, but not sure
about the info on what indexes and filters etc have been chosen.

I am trying to automate the process of detecting sequential scans
and determining the processing path. The purpose of this is to avoid
rerunning the query on a production machine.

Mark


2. ODBC and Win95 Search Path

3. Explain Output made Colourful

4. About Cursor Loaction

5. EXPLAIN PLAN OUTPUT ?????????

6. maximize childforms

7. syslog output from explain looks weird...

8. SQL 2000 enterprise on NT 4 server

9. Rationalizing EXPLAIN VERBOSE output

10. Analyzing EXPLAIN output

11. output from EXPLAIN VERBOSE

12. output of set explain ?

13. Adding qualification conditions to EXPLAIN output