Connecting Tech Pros Worldwide Forums | Help | Site Map

SS2000 500xSELECT on one table; how to speed it up??

Member
 
Join Date: Dec 2007
Posts: 91
#1: Aug 11 '08
Hi

I have a table (1 000 000) and I need to submit min 500 queries (each one is different). I'm using SS2000

Currently it takes 2min and I need it below 1 min.

Is is possible to create the table in memory on then submit all the queries?? would it be faster?? if yes how to do that??

Many thanks in advance.
Emil



Moderator
 
Join Date: Feb 2008
Location: Beauly, near Inverness, Scotland
Posts: 1,576
#2: Aug 11 '08

re: SS2000 500xSELECT on one table; how to speed it up??


Emsik1001, please do not duplicate your posts. This is the third post on this topic you have placed - one previous post was moved to the Access forum by a Moderator, you then placed another post (which I have deleted) in the Access forum (which, to explain the caption Forum Leader above is my home forum, not this one), and a third post in this forum (SQL Server).

As a full member of the site I am sure you are aware of the site rules on duplicate posting.

MODERATOR
Member
 
Join Date: Dec 2007
Posts: 91
#3: Aug 11 '08

re: SS2000 500xSELECT on one table; how to speed it up??


I was advised to move my question to another forum (VB to Access)

and the SQL Server is a different one (at least for me).

Sorry for the unintentional duplicatations.
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#4: Aug 11 '08

re: SS2000 500xSELECT on one table; how to speed it up??


There are a lot of factors to consider.

1. What are these queries? Just Data Access or Data Modifications?

2. Do you need any return values?

3. What are you using these for? Is there a front-end that process the results?

More details, please?

-- CK
Member
 
Join Date: Dec 2007
Posts: 91
#5: Aug 12 '08

re: SS2000 500xSELECT on one table; how to speed it up??


Hi

The process is very simple:

1) a table with data (numeric only)

2) an xls file with 500 records where each row creates a unique SELECT statement which needs to be run on the table and for the same row in xls in the last column should be pasted the result of the SELECT statement.

I'm ok with outputing the results I just need to know if there is a better way of submitting 500 select statements on one table.

Currently 800 000 rows in the table aganst 500 unique select statements take 1:56min (without any modifications to the table yet I want to find a way to reduce this time).

I will give an example of the table row and select statement tonight.

Thanks for your help.
Reply