Tuning
Re: Tuning
От:
"Scott Marlowe" <scott.marlowe@gmail.com>
Дата:
On Mon, Mar 24, 2008 at 4:56 PM, Jack wrote: > > > > > Is there a Postgres equivalent of tkprofs for tuning? you might want to provide an explanation of what tkprofs is and which parts you're interested in emulating in pgsql. Have you read up on explain, explain analyze, and the various pg_stat_* tables? Do any of those help?
Re: Tuning
От:
"Peter Kovacs" <maxottovonstirlitz@gmail.com>
Дата:
tkprof generates performance characteristics for an arbitrary number of SQL statements. The output includes measurements for the individual SQL statements as well as cumulated values for the sequence of SQL statements being measured. Data is presented in a two dimensional format with the first dimension being the type of operation (parsing, compiling, executing, fetching) and the second dimension being the time spent in CPU or IO. You can see a sample output here: http://www.jlcomp.demon.co.uk/tkprof_01.html . The trick is that the Oracle code is instrumented to track all the information necessary for these measurements. When tracing is enabled, the measure values are output sequentially and this output is the post-processed by tkprof. The raw (tracing) output is also fairly readable, so if you want to dig deeper than the tkprof output, you can use it (eventually post-processing it in your own way). I am not familiar with PostgreSQL's explain analyze method, but as far as I remember, it can be used only for one SQL statement and requires a significant amount of practice to interpret easily. BTW, I had a bookmark for a good tutorial on explain analyze, but the page is no longer available: http://www.pervasive-postgres.com/instantkb13/article.aspx?id=10120 . Can you suggest a good tutorial? Thanks Peter On Tue, Mar 25, 2008 at 4:29 PM, Scott Marlowe wrote: > On Mon, Mar 24, 2008 at 4:56 PM, Jack wrote: > > > > > > > > > > Is there a Postgres equivalent of tkprofs for tuning? > > you might want to provide an explanation of what tkprofs is and which > parts you're interested in emulating in pgsql. > > Have you read up on explain, explain analyze, and the various > pg_stat_* tables? Do any of those help? > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin >
Re: Tuning
От:
"Milen A. Radev" <milen@radev.net>
Дата:
Peter Kovacs написа: [...] > BTW, I had a bookmark for a good tutorial on explain analyze, but the > page is no longer available: > http://www.pervasive-postgres.com/instantkb13/article.aspx?id=10120 . > Can you suggest a good tutorial? I'm not sure what was the tutorial at the above URL but this what I know: http://redivi.com/~bob/oscon2005_pgsql_pdf/OSCON_Explaining_Explain_Public.pdf (google for "explaining explain") [...] -- Milen A. Radev
Re: Tuning
От:
"Jonah H. Harris" <jonah.harris@gmail.com>
Дата:
On Mon, Mar 24, 2008 at 6:56 PM, Jack wrote: > Is there a Postgres equivalent of tkprofs for tuning? No. But what you could do is combine several Postgres things to try and get the same information. IIRC, you could use: - log_parser_stats - log_planner_stats - log_executor_stats while running EXPLAIN ANALYZE on the query. psql -U user1 -d postgres > /tmp/pgprof.out 2>&1 <