October 8, 2005 at 3:05 am
Has anyone ever seen a reliable way to determine query cost/estimated time to complete a query from a client application?
Looking at set showplan_all, I see some possibilities but am left to guess what the total query cost/time really is, could be time in seconds, could be...?
In this circumstance I would like to evaluate a sql statement at run time (e.g. user hits submit button on a web page) and determine whether the query should be attempted or submitted asynchronously and the results returned via email or other method.
Setting a server query cost limit doesn't solve the problem - queries have to run not get thrown out for exceeding cost limit.
Thanks,
Joe
October 9, 2005 at 6:05 am
It's impossible (or close) to get estimated time. Even if you have an estimated cost for a query you still need a lot of metrics, which will be ever-changing, that translate that cost into time. How much CPU will you get, how many I/Os, is data in cache or not. And even if you have these you never know if you will be blocked by other requests.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply