Subject: Profiling database

From: [email-masked] (Steve Davidson)
Date: Wed, 9 Jun 93 14:25:54 -0700

Dear Postgressors,

1) How can I tell which indexes are used by a particular query?
   Is there any way to see the optimizations that a retrieve invokes?

2) Is there any code or instructions describing how to profile
   Postgres retrieve operations?

   I'm using PGPERL to do some simple profiling of Postgres on my 
   computer.  The steps are simple:

   a) Make a large data base with some unique value in each record.

   b) Without any indexes, 
	 measure time to access the first record;
         measure time to access last record.
         measure time to access 1000 records at random.

   c) Define an index, and repeat tests in #2

3) When using the following retrieves (assume a large number of tuples):

   retrieve portal eportal QUERY   ...and then
   fetch all in eportal

   Which operation consumes the majority of CPU cycles?
   the retrieve or the fetch?

   Any other ideas?  

   My perl code is available upon request to whoever wants it.
   Be warned its just a frame for doing some profiling.

[email-masked]