Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Optimizing query with temp table

Status
Not open for further replies.

sam93

Programmer
Jul 19, 2002
65
CA
Hi,

I'm having problem tuning a query with 4 tables, one of which is a global temp. table.

I created a normal table with the same structure and data as the temp table and used it in the query instead of the temp table and the query returned the data instantly.
In the explain plan, if I use the global temp table, it shows 16k rows read from it, while if I replace it with the regular table, it shows just 64 rows read from the table, although the number of rows is exactly the same in both the tables.

Is there anything in the instance that I can look at to see why it is taking so much more time with the use of the temp table?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top