pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedpostgresql Explain command output
5+ messages / 3 participants
[nested] [flat]
* postgresql Explain command output
@ 2008-03-06 06:10 RaviRam Kolipaka <raviram.kolipaka@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: RaviRam Kolipaka @ 2008-03-06 06:10 UTC (permalink / raw)
To: pgsql-performance
hi,
is there any generalized format for the output for the output of the
explain command ?. If so please send that generalized format to me.
otherwise tell me how to parse the output of explain command to
know where the relation name occurs,where the conditions occurs,
where the join conditions occur and so on. My goal is create a visual
representation of the expain plan. Can some body help me in this regard.
Thanks & regards
RAVIRAM KOLIPAKA
M.TECH(CSE)-final year
IIIT Hyderabad
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: postgresql Explain command output
@ 2008-03-06 13:10 Greg Smith <gsmith@gregsmith.com>
parent: RaviRam Kolipaka <raviram.kolipaka@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Greg Smith @ 2008-03-06 13:10 UTC (permalink / raw)
To: RaviRam Kolipaka <raviram.kolipaka@gmail.com>; +Cc: pgsql-performance
On Thu, 6 Mar 2008, RaviRam Kolipaka wrote:
> My goal is create a visual representation of the expain plan.
This problem has been solved already by code that's in pgadmin and you
might look at that source code for hints if you want to write your own
implementation. There's a good intro to using that at
http://www.postgresonline.com/journal/index.php?/archives/27-Reading-PgAdmin-Graphical-Explain-Plans...
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: postgresql Explain command output
@ 2008-03-06 13:31 Tom Lane <tgl@sss.pgh.pa.us>
parent: Greg Smith <gsmith@gregsmith.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2008-03-06 13:31 UTC (permalink / raw)
To: Greg Smith <gsmith@gregsmith.com>; +Cc: RaviRam Kolipaka <raviram.kolipaka@gmail.com>; pgsql-performance
Greg Smith <gsmith@gregsmith.com> writes:
> On Thu, 6 Mar 2008, RaviRam Kolipaka wrote:
>> My goal is create a visual representation of the expain plan.
> This problem has been solved already by code that's in pgadmin and you
> might look at that source code for hints if you want to write your own
> implementation.
It's been solved more than once actually --- Red Hat did a "Visual
Explain" tool several years ago, which is unmaintained now but still
available for download (http://sources.redhat.com/rhdb/). I've heard
that EDB picked it up and is now maintaining their own fork, but I
don't know the status of that for sure. That code is in Java, if it
makes a difference to you.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: postgresql Explain command output
@ 2008-03-06 13:43 Greg Smith <gsmith@gregsmith.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Greg Smith @ 2008-03-06 13:43 UTC (permalink / raw)
To: ; +Cc: RaviRam Kolipaka <raviram.kolipaka@gmail.com>; pgsql-performance
On Thu, 6 Mar 2008, Tom Lane wrote:
> Red Hat did a "Visual Explain" tool several years ago, which is
> unmaintained now but still available for download
> (http://sources.redhat.com/rhdb/). I've heard that EDB picked it up and
> is now maintaining their own fork, but I don't know the status of that
> for sure.
I know I wrote this down somewhere...ah ha, it was in the MySQL
comparision paper:
Visual Explain, originally a RedHat component that has been kept current
and improved by Enterprise DB, comes bundled with the EnterpriseDB
Advanced Server package. It can be built to run against other PostgreSQL
installations using the source code to their Developer Studio package:
http://www.enterprisedb.com/products/download.do
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: postgresql Explain command output
@ 2008-03-07 12:59 RaviRam Kolipaka <raviram.kolipaka@gmail.com>
parent: RaviRam Kolipaka <raviram.kolipaka@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: RaviRam Kolipaka @ 2008-03-07 12:59 UTC (permalink / raw)
To: Devi <devi@visolve.com>; +Cc: pgsql-performance
How do we know in the output of expain command table or constraint names
so that while parsing each line of the output
we can able to recognise them and build the pictorial representation. for
example if you consider the following output
EXPLAIN select * from table1,table2 where roll=id_no;
QUERY PLAN
----------------------------------------------------------------------
Hash Join (cost=29.12..59.31 rows=850 width=124)
Hash Cond: (table2.id_no = table1.roll)
-> Seq Scan on table2 (cost=0.00..18.50 rows=850 width=62)
-> Hash (cost=18.50..18.50 rows=850 width=62)
-> Seq Scan on table1 (cost=0.00..18.50 rows=850 width=62)
we can know the table name , just by seeing any string after ON
keyword . Like that how to recognise the other constraints and so on.
On Thu, Mar 6, 2008 at 12:24 PM, Devi <devi@visolve.com> wrote:
> Hi,
>
> I suppose the format depends on the query you serve. The following links
> will throw some light.
>
> http://www.postgresql.org/docs/8.1/static/sql-explain.html
> http://www.postgresql.org/docs/7/static/c4888.htm
>
> Thanks
> DEVI.G
>
> ----- Original Message -----
> *From:* RaviRam Kolipaka <raviram.kolipaka@gmail.com>
> *To:* pgsql-performance@postgresql.org
> *Sent:* Thursday, March 06, 2008 11:40 AM
> *Subject:* [PERFORM] postgresql Explain command output
>
>
> hi,
>
> is there any generalized format for the output for the output of the
> explain command ?. If so please send that generalized format to me.
> otherwise tell me how to parse the output of explain command to
> know where the relation name occurs,where the conditions occurs,
> where the join conditions occur and so on. My goal is create a visual
> representation of the expain plan. Can some body help me in this regard.
> Thanks & regards
> RAVIRAM KOLIPAKA
> M.TECH(CSE)-final year
> IIIT Hyderabad
>
> ------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.5/1314 - Release Date: 3/5/2008
> 6:38 PM
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2008-03-07 12:59 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 06:10 postgresql Explain command output RaviRam Kolipaka <raviram.kolipaka@gmail.com>
2008-03-06 13:10 ` Greg Smith <gsmith@gregsmith.com>
2008-03-06 13:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-03-06 13:43 ` Greg Smith <gsmith@gregsmith.com>
2008-03-07 12:59 ` RaviRam Kolipaka <raviram.kolipaka@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox