Q
Problem solve Get help with specific problems with your technologies, process and projects.

Reading, writing and reporting on queries

Do you know of either a script or bat file that can read 100 individual query files, connect to a database, do EXPLAIN on each query and write the EXPLAIN report on each query in batch mode?
Sorry, I don't have a ready-made script for you, but there are a number of ways you can do this and it would be a worthwhile exercise to develop a utility. One possibility is to store the queries in a database table, and in a PL/SQL procedure, fetch each query and then perform the EXPLAIN (the results go into PLAN_TABLE; it can hold the results of all 100 queries--just be sure to give each query an ID when you issue the EXPLAIN command). Finally, you can write a query to fetch the plans from the PLAN_TABLE, and save the results to a file.

Dig Deeper on Oracle database performance problems and tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close