Click here to Skip to main content
15,898,947 members
Home / Discussions / Database
   

Database

 
QuestionHow to encrypt SQL Server 2005 Database? Pin
A k ch4-Jun-09 21:49
A k ch4-Jun-09 21:49 
AnswerRe: How to encrypt SQL Server 2005 Database? Pin
Mycroft Holmes6-Jun-09 4:27
professionalMycroft Holmes6-Jun-09 4:27 
Questionquery not working correctly Pin
Mathew P V4-Jun-09 20:49
Mathew P V4-Jun-09 20:49 
AnswerRe: query not working correctly Pin
smcnulty20004-Jun-09 23:54
smcnulty20004-Jun-09 23:54 
GeneralRe: query not working correctly Pin
Mathew P V5-Jun-09 0:26
Mathew P V5-Jun-09 0:26 
GeneralRe: query not working correctly Pin
Niladri_Biswas6-Jun-09 19:01
Niladri_Biswas6-Jun-09 19:01 
QuestionMSOLAP.2 provider problem Pin
ThaScorpion4-Jun-09 3:26
ThaScorpion4-Jun-09 3:26 
Questionhow to handle no data found error in sql server Pin
lakshmichawala4-Jun-09 3:25
lakshmichawala4-Jun-09 3:25 
AnswerRe: how to handle no data found error in sql server Pin
Ashfield4-Jun-09 21:04
Ashfield4-Jun-09 21:04 
QuestionOne more query problem Pin
sujithkumarsl3-Jun-09 23:36
sujithkumarsl3-Jun-09 23:36 
AnswerRe: One more query problem Pin
Mycroft Holmes4-Jun-09 19:42
professionalMycroft Holmes4-Jun-09 19:42 
AnswerRe: One more query problem Pin
Niladri_Biswas6-Jun-09 19:38
Niladri_Biswas6-Jun-09 19:38 
QuestionQuery problem [modified] Pin
sujithkumarsl3-Jun-09 22:31
sujithkumarsl3-Jun-09 22:31 
AnswerRe: Query problem [modified] Pin
Niladri_Biswas6-Jun-09 20:01
Niladri_Biswas6-Jun-09 20:01 
GeneralRe: Query problem Pin
Niladri_Biswas6-Jun-09 20:44
Niladri_Biswas6-Jun-09 20:44 
QuestionDefault Collation Pin
hadad3-Jun-09 22:03
hadad3-Jun-09 22:03 
QuestionPerfomance on the Following Query Pin
Vimalsoft(Pty) Ltd3-Jun-09 20:54
professionalVimalsoft(Pty) Ltd3-Jun-09 20:54 
AnswerRe: Perfomance on the Following Query Pin
Ashfield3-Jun-09 21:04
Ashfield3-Jun-09 21:04 
GeneralRe: Perfomance on the Following Query Pin
Vimalsoft(Pty) Ltd3-Jun-09 21:34
professionalVimalsoft(Pty) Ltd3-Jun-09 21:34 
GeneralRe: Perfomance on the Following Query Pin
Ashfield4-Jun-09 1:31
Ashfield4-Jun-09 1:31 
GeneralRe: Perfomance on the Following Query Pin
smcnulty20004-Jun-09 1:58
smcnulty20004-Jun-09 1:58 
AnswerRe: Perfomance on the Following Query Pin
smcnulty20003-Jun-09 22:36
smcnulty20003-Jun-09 22:36 
Short answer: try removing the index.

Long answer:

How many records are you putting in? That's pretty critical to discussing this. 29 seconds with a billion records is different than 29 seconds with a 1000 records.

You might be better off without the index. I recommend you drop the index and retest your speeds without it.
Realize that indexes are great for lookup but there is a price to pay when you write to a table.

Every time you write to the table, the system has to rebuild the index and since you are using a clustered index you are reordering the data blocks in the same order as the index. So you write, then insert the next line, then reorder, then rewrite the whole mess. That's not exactly efficient.

And because it is a primary key the system will check the uniqueness of each line entered every one of those checks costs you.

Equally important is the fact that you are indexing all columns in one index. You really are just trading disk reads in one place for disk reads in another.

On the other side; when someone runs a select against this table what percentage of the data will be returned on a regular basis? Will it be 5% or less? Or will it be most of the table.

If you aren't going to see 5% or less then having an index is just a waste. Full table scans would be quicker.

With all of that in mind; if you must have the index then see if you can code the situation so that it drops the index, then inserts all the data in one fell swoop, then rebuilds the index.

_____________________________
Those who study history are doomed to watch others repeat it. -Scott M.


GeneralRe: Perfomance on the Following Query Pin
Vimalsoft(Pty) Ltd4-Jun-09 0:00
professionalVimalsoft(Pty) Ltd4-Jun-09 0:00 
GeneralRe: Perfomance on the Following Query Pin
Ashfield4-Jun-09 1:24
Ashfield4-Jun-09 1:24 
GeneralRe: Perfomance on the Following Query Pin
smcnulty20004-Jun-09 1:37
smcnulty20004-Jun-09 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.