SQL Server Magazine Forums

Spacer
< REFRESH >
Topic Title: Query Parallel Tables
Topic Summary:
Created On: 06/19/2009 01:52 PM

View topic in raw text format.
 06/19/2009 01:52 PM
 User is offline  Print this message

Author Icon
hopeful

Posts: 46
Joined: 11/08/2002

I'm acquiring a mailing list with over 1,000,000 records, in over 50 CSV files (by state, I think). I expect to be modifying the list myself -- adding fields, adding & changing records -- as well as periodically acquiring updates from the original source. I'll be using a remote SQL Server 2000, accessing it either by web programming or my local SQL Server Management Studio.

I have 2 questions.

1) Am I better off dumping all the data into one huge SQL Server table, or having a table for each CSV file?

2) If I use 50 parallel tables, how do I structure a query to look at the same field in the different parallel tables -- in other words, that would create a virtual table that would combine the data from the parallel tables, so that I could then filter by the Annual_Sales field, for example, and have it look at this field in all the separate tables as a collective?

(Occasionally I've had other situations where I wanted to deal with parallel tables, so I'd appreciate an answer to the second question even if you think 50 parallel tables are unnecessary and nuts.)

Thank you!
    Reply     Quote     Top     Bottom    
 06/19/2009 10:06 PM
 User is offline  View Users Profile  Print this message

Author Icon
gunneyk

Posts: 1128
Joined: 07/27/2007

1M rows is pretty small these days for SQL Server so I don't see a need to create 50 tables just on row count. Maintenance on 50 tables vs. 1 seems a bit much as well.

-------------------------
Andrew J. Kelly
    Reply     Quote     Top     Bottom    
 09/04/2009 03:09 AM
 User is offline  Print this message

Author Icon
SQLUSA

Posts: 2858
Joined: 05/17/2005

As gunneyk indicated, single table solution is the best.

You can use DTS (SQL Server 2000) packages to do the ETL (Extract, Transform, Load) tasks.

Kalman Toth, SQL Server 2008 Training
http://www.sqlusa.com
    Reply     Quote     Top     Bottom    
View topic in raw text format.
< REFRESH >

FuseTalk Enterprise Edition - © 1999-2009 FuseTalk Inc. All rights reserved.