Skip site navigation (1) Skip section navigation (2)

Re: Execution plan

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: std pik <stdpik(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Execution plan
Date: 2010-07-23 07:29:43
Message-ID: AANLkTildotCdmP7MofqQKFsV-Q4IzjQquR31NZxV1Rv5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Thu, Jul 22, 2010 at 10:10 PM, std pik <stdpik(at)gmail(dot)com> wrote:
> Hi all..
> Can any one help me?
> I'd like to know how can we get the following information in
> PostgreSQL:
> Execution plan

explain <your query here>
explain analyze <your query here>

explain just shows the plan, explain analyze shows the plan, runs the
query, then shows the difference between the plan and actual
execution.

> The I/O physical reads and logical reads, CPU consumption, number of
> DB block used, and any other information relevant to performance.
> Taking into consideration that these information could be extracted
> from Oracle by AWR, TKPROF, ...etc.

Yeah, pgsql doesn't really track a lot of that stuff as well as
oracle.  You can use pg_stat_* tables to get some idea, and running an
individual query while using tools like iostat, vmstat, htop, and more
can give you some idea of how it's working the system.  Also the
pg_buffercache stuff (I think that's the name I'm away from my servers
right now)

In response to

pgsql-admin by date

Next:From: Lou PiccianoDate: 2010-07-23 16:58:36
Subject: FTP client functions?
Previous:From: Andreas SchmitzDate: 2010-07-23 06:16:03
Subject: Re: Restore a backup to a different disk?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group