Programatically evaluate the cost of a query
Hi,
I want to find a mechanism to evaluate the cost of a query before executing it. The query is built in a java based application, based on the user's input and I want to prevent large executing queries being executed by the application.
Is there a way for me to problematically execute an explain plan for the sql statement and get the cost of the query?
One way that I am thinking is to create a function and use that function to return the cost, but I don't think this is the cleanest and most efficient way to get the results I want.......
I want to find a mechanism to evaluate the cost of a query before executing it. The query is built in a java based application, based on the user's input and I want to prevent large executing queries being executed by the application.
Is there a way for me to problematically execute an explain plan for the sql statement and get the cost of the query?
One way that I am thinking is to create a function and use that function to return the cost, but I don't think this is the cleanest and most efficient way to get the results I want.......
0