dbTalk Databases Forums  

Looping, Importing and Archiving

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Looping, Importing and Archiving in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul
 
Posts: n/a

Default Looping, Importing and Archiving - 03-07-2004 , 01:01 AM






Looping, Importing and Archiving @ http://www.sqldts.com/default.aspx?t...3&i=246&p=1&a=

I used this package to import 958 text files of stock quotes into a single sql table that now has 9.38 million rows

The queries are slow as molasses. I was told that having all these quotes in one table is the way to do it, so if that is true, can anyone tell me how to check the data to see if there is something that I can do to speed up the queries

Thanks

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Looping, Importing and Archiving - 03-07-2004 , 04:20 AM






There are quite a few things you can do

1. Indexing. Choose the right indexing for you queries
2. Query Plan. What is the Query actually doing
3. Fragmented table?
4. Slow Server
5. Use distributed views.
6. What resources are taken up during the Query? In perfmon you will be
able to see Processor utilisation, memory, disk activity.
7. How wide is the row and are you pulling back more infor than you need.
A SELECT * FROM TABLE is going to select all columns and all rows and that
is going to take time.


Just a few ideas.



--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Looping, Importing and Archiving @
http://www.sqldts.com/default.aspx?t...&i=246&p=1&a=0

I used this package to import 958 text files of stock quotes into a single
sql table that now has 9.38 million rows.

The queries are slow as molasses. I was told that having all these quotes
in one table is the way to do it, so if that is true, can anyone tell me how
to check the data to see if there is something that I can do to speed up the
queries?
Quote:
Thanks



Reply With Quote
  #3  
Old   
Paul
 
Posts: n/a

Default Re: Looping, Importing and Archiving - 03-07-2004 , 09:56 AM



Allan

Thanks very much for your suggestions. As I'm very new to learning sql, this is the first table that I've indexed and it was pretty impressive to see the seek time on the query drop from 1 min 23 seconds to less than 1 second

I'll see what I can do with your other suggestions

Thanks

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.