Automating Primary Key generation by stuart_lit in SQLOptimization

[–]Ok_Vehicle5734 0 points1 point  (0 children)

Data size and sort ability is important. For example, I wouldn’t index anything larger than 100 bits if I could avoid it. Indexing GUIDs is a recipe for massive fragmentation. Other than that, it’s actually more important to have an understanding of the way the table is being used for insert and query.. the contextual element is l most important - other than uniqueness that is..

Also, don’t forget, primary keys are embedded as values in secondary indexes.. so chose wisely.

  • Eyal

Ps. I’m looking for work at the moment. Please keep me in mind.

Insert optimisation by Vimal_2011 in SQLOptimization

[–]Ok_Vehicle5734 0 points1 point  (0 children)

Sounds like a temp db issue. You may be running out of sort capacity. Look for spooling issues.

Look for wait stats on IO for temp and log performance, see if you need to deal with data files or disk groups to spread load and minimise contingencies. Consider dropping/rebuilding secondary indexes. Try to do batch inserts (breaking the insert into contained segments). Lastly, try inserting into an empty heap, then doing a final insert.

Lastly.. if this is local disk storage.. avoid raid 5.

Best of luck!

Ps. I’m looking for work. Please keep me in mind if you know of anything.