Showing posts with label http. Show all posts
Showing posts with label http. Show all posts

Monday, March 26, 2012

Historical tables, partitioning or what?

I have about 45000 records in a CSV file, which I am using as HTTP request parameters to query a website and store some results in a database. This is the kind of application which runs 24/7, so database grows really quickly. Every insert fires up a trigger, which has to look for some old records based on some criteria and modify the last inserted record. My client is crazy about performance on this one and suggested to move the old records into another table, which has exactly the same structure, but would serve as a historical table only (used to generate reports, statistics, etc.), whilst the original table would store only the latest rows (so no more than 45k at a given time, whereas the historical table may grow to millions of records). Is this a good idea? Having the performance in mind and the fact that there's that trigger - it has to run as quickly as possible - I might second that idea. Is it good or bad? What do you think?

I read a similar post here, which mentioned SQL Server 2005 partitioning, I might as well try this, although I never used it before.

I think you should use the archive table and partition it with 2005s new capabilities. This will allow you to easily administer the table(s). Heres a good link on 2005 partitioning. http://msdn2.microsoft.com/en-us/library/ms345146.aspx If you use a seperate archive table, you can create good indexes that will really speed queries. The only bad thing is that if you insert new records into it often, it could be slow. So, you might want to only insert new archive records during off-peak time if possible.
Tim|||I would caution to have the absolute minimal indexes on the archive table. In some situations, it may be efficient to create an index just for a report, and then remove the index as soon as the report is complete.|||Thanks for your comments. I read about SQL Server 2005's partitioning feature and find it very interesting (and useful, I think), but the application in question runs on the Express Edition currently with possible switch to a higher version, but doubtfuly the Enterprise one, so partitioning is out of the question, unfortunately. Sad I will hopefuly use it when I will work on some enterprise level application in the future.

Hilarys webcast

Hilary,
The webcast of yours http://support.microsoft.com/default.aspx?kbid=893437
doesnt seem to work. Have you checked with MS about it ? Also the transcript
redirects to a page not found..
works for me. sent me here:
http://support.microsoft.com/default...b;en-us;893437
"Hassan" wrote:

> Hilary,
> The webcast of yours http://support.microsoft.com/default.aspx?kbid=893437
> doesnt seem to work. Have you checked with MS about it ? Also the transcript
> redirects to a page not found..
>
>
|||Doesnt want for me.. The page comes up fine but when i click on attend the
livemeeting it takes me to
http://placeware.viewcentral.com/eve...gnupkey=ce0216
And theres nothing there
"Aubrey" <Aubrey@.discussions.microsoft.com> wrote in message
news:E4D43EAF-E56B-476C-8B67-7A65B7D21A3E@.microsoft.com...[vbcol=seagreen]
> works for me. sent me here:
> http://support.microsoft.com/default...b;en-us;893437
> "Hassan" wrote:
http://support.microsoft.com/default.aspx?kbid=893437[vbcol=seagreen]
transcript[vbcol=seagreen]
sql

Hilary's book

http://www.nwsu.com/forthcoming.html
A couple more weeks.

>--Original Message--
>Anyone know where Hilary's book can be purchased? I
>checked Amazon, but no luck.
>.
>
that timeframe is inaccurate. It will probably be going to print early
August, possibly even the first week in August. It takes between 25 to 35
days to print.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"ChrisR" <anonymous@.discussions.microsoft.com> wrote in message
news:518101c473ff$8218bad0$a301280a@.phx.gbl...[vbcol=seagreen]
> http://www.nwsu.com/forthcoming.html
> A couple more weeks.
>
|||My bad. Sorry.

>--Original Message--
>that timeframe is inaccurate. It will probably be going
to print early
>August, possibly even the first week in August. It takes
between 25 to 35
>days to print.
>--
>Hilary Cotter
>Looking for a book on SQL Server replication?
>http://www.nwsu.com/0974973602.html
>
>"ChrisR" <anonymous@.discussions.microsoft.com> wrote in
message
>news:518101c473ff$8218bad0$a301280a@.phx.gbl...
>
>.
>