Estimate time to execute query - any ideas

From: Rebecca Bagdasarian <rkb_at_hpcc.epa.gov>
Date: 1995/08/18
Message-ID: <412qnq$fqi_at_monsoon.rtpnc.epa.gov>#1/1


Are there any algorithms out there to estimate the time it will take to run a query? I have this application which stored millions of records. It is a database archive which will get additional records every few months for the next year or so. Then it will stop growing. Some of the tables are quite large. The loads may take hours - and that is OK since load are performed infrequently.

This application will have a dedicated machine and will service fewer than a dozen requests a week. I'd be surprised to find more than one user on the system at any given time.

I'm considering adding some counters in the db. They will be incremented by the data load programs or by triggers. These counters will give me a ballpark of how many rows my final query will retrieve. This lets me estimate the output size (output may be to a UNIX file). How about the time? Is there some algorithm or method to guide me as I try to come up with formulas for each query? For tableA with Y rows (each row size = X) how long will it take to join with tableB which has YY rows (each row size = XX). Has anyone done this before?

Please respond to my mail address directly if you have any hints.

Thank You,
R.K.B.

---
===========================================================================
Rebecca K. Bagdasarian                 rkb_at_hpcc.epa.gov
EPA Systems Development Center     
Arlington, VA 
Received on Fri Aug 18 1995 - 00:00:00 CEST

Original text of this message