Hi, all.
I'm very new to Oracle and was wondering if there's a way either through some tool or programmatically to estimate how a long a query would to take to execute?
THanks!
Hi, all.
I'm very new to Oracle and was wondering if there's a way either through some tool or programmatically to estimate how a long a query would to take to execute?
THanks!
The best way to estimate the running time it is to create some test data that resembles the real data you expect to get, run it on that data, and time how long it takes.
Yes there is a way theoretically. At least in Sybase (and likely in oriacle as well), there's such a thing as table statistics (used by optimizer to determine the most optimal query plan). You can compute rougly the amount of data the query will return and how long it would take from that.
However, it's not trivial (you basically need to duplicate the logic of optimizer and query compiler) and the statistics may not be available to outside code.