473,398 Members | 2,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Smarter Table build - might split the table

Hello,
I am using SQL 2005 and Cognos' Data Manager. It is an ETL tool for
data warehousing.
I have a problem with time it takes to load new changes, and I am
seeking advice on a better way to manage the data.

I have a table that tracks student attendance and it contains about 13
million records. On a daily basis, there are 5,000 - 20,000 inserts and
10,000 - 50,000 updates.
The daily data comes for two different text files from my operation
system; current and historical (CLSFIL and CLSHIS).
The data is loaded into a staging area from the operational system,
where data cleansing and other fields are added to the table.

The final step is delivering the table to my target database, which is
used for reporting.
Heres the situation: I find it takes 45 minutes to do a relational
update, where only the records that changed in the last day will be
loaded. However, if I choose the native API load instead of a
Relational Load, it can load all 13M records in 7 minutes. The table is
heavly indexed
At some point, the API load will take more time than the relational
load, (the changes and new records will remain a constant, but the file
will continue to grow).
I'm seeking another solution is more efficient. I'm considering two
tables for history and current and creating a view for reporting via a
union.

This a good idea? How can I make the view effeicent to use the where
clause? Looking to bounce around ideas.

Other Ideas?
Thanks in Advance
Rob

(I maintain the key relationships in the tool, not the tables. I know
I have lots to learn and improvments)
CREATE TABLE "dbo"."F_BI_Class_Attendance_Detail"
(
"CLASS_ATTENDANCE_ID" VARCHAR(50) NULL,
"CLASSES_OFFERED_ID" VARCHAR(26) NULL,
"CLASS_CAMPUS_ID" VARCHAR(10) NULL,
"STUDENT_ID" CHAR(20) NULL,
"FULL_CLASS_ID" CHAR(15) NOT NULL,
"SESSION_ID" CHAR(10) NULL,
"SECTION_ID" VARCHAR(5) NULL,
"MEET_DT" DATETIME NULL,
"MEETING" SMALLINT NULL,
"PRESENT" CHAR(2) NOT NULL,
"SESSION_SKEY" BIGINT NULL,
"STUDENT_SKEY" BIGINT NULL,
"CLASS_CAMPUS_SKEY" BIGINT NULL,
"CLASSES_OFFERED_SKEY" BIGINT NULL,
"LOAD_DT" DATETIME NULL,
"COMPUTED_DT" DATETIME NULL
)
;

Jul 10 '06 #1
3 1085
I have not partitioned the table. Here are the indexes:
CREATE INDEX CLASS_ATTENDANCE_ID ON
"dbo"."F_BI_Class_Attendance_Detail" ( "CLASS_ATTENDANCE_ID" );
CREATE INDEX CLASS_CAMPUS_ID ON "dbo"."F_BI_Class_Attendance_Detail" (
"CLASS_CAMPUS_ID" );
CREATE INDEX STUDENT_ID ON "dbo"."F_BI_Class_Attendance_Detail" (
"STUDENT_ID" );
CREATE INDEX FULL_CLASS_ID ON "dbo"."F_BI_Class_Attendance_Detail" (
"FULL_CLASS_ID" );
CREATE INDEX SESSION_ID ON "dbo"."F_BI_Class_Attendance_Detail" (
"SESSION_ID" );
CREATE INDEX MEETING ON "dbo"."F_BI_Class_Attendance_Detail" (
"MEETING" );
CREATE INDEX PRESENT ON "dbo"."F_BI_Class_Attendance_Detail" (
"PRESENT" );
CREATE INDEX SESSION_SKEY ON "dbo"."F_BI_Class_Attendance_Detail" (
"SESSION_SKEY" );
CREATE INDEX STUDENT_SKEY ON "dbo"."F_BI_Class_Attendance_Detail" (
"STUDENT_SKEY" );
CREATE INDEX CLASS_CAMPUS_SKEY ON "dbo"."F_BI_Class_Attendance_Detail"
( "CLASS_CAMPUS_SKEY" );

Jul 10 '06 #2
Upon more research in this news group, it looks like I should look at
horizontal partitioning.
I am using SQL 2005 Enterprise, so I should be able to use partitioned
data and indexes.
If I partition on year, what should I consider to make this as
maintenance free as possible (what happens where a new year comes?)
TIA
Rob

Jul 10 '06 #3
On 10 Jul 2006 07:31:10 -0700, rcamarda wrote:

(snip)
>Heres the situation: I find it takes 45 minutes to do a relational
update, where only the records that changed in the last day will be
loaded.
Hi Rob,

What column(s) is/are used to relate rows in the staging tables to the
matching rows in the target table? Are there any indexes on the staging
table? Can you post the query you use for this relational update?

--
Hugo Kornelis, SQL Server MVP
Jul 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: vool | last post by:
Hi All Can anyone help with this please. I need a way of putting say 10 to 20 bullet points in one table field in an Access database - say seperate them with a special character, then build a...
1
by: praba kar | last post by:
Dear All, I am new to python world. I have pasted my code which I used it to build rfc822 format mails for webbased mailing system task(which is like to yahoo.com web interface). Now I am...
1
by: Little | last post by:
Could someone start me on putting in a table into this code, and some HTML tags. I would to make the table below the map and have a header at the top. Thanks for the help. """ Publisher example...
3
by: Rich Shepard | last post by:
I need to learn how to process a byte stream from a form reader where each pair of bytes has meaning according to lookup dictionaries, then use the values to build an array of rows inserted into a...
5
by: mctime | last post by:
Hello, I am attempting to split a raw data table into a new table that has split out a specific field in the raw data and created a new record for each split but I have come to an impasse due to...
7
by: Mariusf | last post by:
I am a novice Perl programmer and need to change a perl script that I use to create web pages with thumbnail images and some text. Currently the script created a web page for each artist / category...
1
by: Sorrow | last post by:
I'm wondering if there is anything out there that discusses the above? I need to be able to add and remove TDs and TRs to a table all the while maintaining the overall layout. For example, if the...
10
by: Gilles Ganault | last post by:
Hello Out of curiosity, is there a smarter, easier way to read data sent by a form, and save them into a database? I have about 20 fields, and it'd be easier if I could just use a loop to go...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.