for a given query. In some databases the query plan can be reviewed, problems found, and then the query optimizer gives hints on how to improve it. In other databases, alternatives to express the same query (other queries that return the same results) can be tried. Some query tools can generate embedded hints in the query, for use by the optimizer. Some databases - like Oracle - provide a plan table for query tuning. This plan table will return the cost and time for executing a query. Oracle offers two optimization approaches: CBO or Cost Based Optimization RBO or Rule Based Optimization RBO is slowly being deprecated. For CBO to be used, all the tables referenced by the query must be analyzed. To analyze a table, a DBA can launch code from the DBMS_STATS package. Other tools for query optimization include: SQL Trace Oracle Trace and TKPROF Microsoft SMS (SQL) Execution Plan Tableau Performance Recording (all DB) Database management systems SQL References