
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
You can probably wrap it all into 1 stored proc assuming you're using SQL server. The first two parts can be done quite easily as BV suggests, what is the third bit? Is it to do with grouping? How about some sample results? And/Or the webpage? "gonzal" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, just a quick question regarding performance and speed. > > > > Q. Run a complicated query three times or create a TEMPORARY table and > access it as needed? > > > > > > I have a page where it will be accessed 10,000+ a day. > > In that page I have an SQL query where it involves 3 different tables > (approximate table sizes T1) 200,000 T2) 900,000 T3) 20 records) > > I'll be running that query 3 times in that page... > > One to retrieve the content and display it on the page. > > Second to count the number of records (using COUNT(*) function) > > And third to retrieve the content regions. (using DISTINCT function) > > > > What would be the best way of doing... > > > > Running the SQL query 3 times > > Or > > Create a temporary table and access it as many time as I need > > > > > > Regards,
| <-- __Chronological__ --> | <-- __Thread__ --> |