August 8, 2002 at 10:16 am
Heeeeeeeeeeeelllo!!
I took a peak in BOL and found out that primary keys are almost the same as indexes - they speed things up in JOINS and stuff... But is there a performance cost in deleting primary keys (as there is in indexes)? I assume there is but I just wanna be sure.
Thanks!
/Tomi
August 9, 2002 at 3:32 am
Sure. Certain amount of clean up has to be done, depending on the type type of index. Not sure why you'd be dropping your pkey very often?
Andy
August 9, 2002 at 9:49 am
Hello!
Well, I'm making a message sending system. And this specific table will hold all the new messages. The messages won't be saved anywhere so I just delete them immediately after the user has read it, thus I'll delete the primary key VERY often. Make sense?
/Tomi
August 9, 2002 at 10:07 am
That does. Deleting a row has a cost, every index (and pkey is really an index) adds to that. Just the nature of indexes. Unless you have a lot of them...which I wouldnt expect on a messaging system, it will probably be very low cost.
Andy
August 10, 2002 at 3:45 am
If this isn't the greatest SQL forum then what is!? Once again I got exellent help. Thank you!
/Tomi
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply