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!

Performance Boost (using tamp tables)

Status
Not open for further replies.

StoneDeCroze

Programmer
Feb 11, 2002
36
GB
Y'all prolly know this, but having just found out for myself I thought I'd share a performance snippet.

I needed to create a running total - found the SQL for that okay - but the performance was pants, so with a bit of fiddling ...

My Tip (works for me anyway).

1) SELECT the data into a temp table and run the query on that - this gave me a 77% performance gain.

2) BEFORE running the final query add a primary key to the appropriate column on the temp table - a further 17% performance gain!!

As I say, I'm probably 10 years behind the times, but ...
Peter
 
Show us the before and after.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top