• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

travislaborde
#1 Posted : Monday, August 31, 2009 6:37:49 PM(UTC)
travislaborde

Rank: Member

Joined: 8/31/2009(UTC)
Posts: 2

I've inherited maintenance on this app, and I'm working my way through some database performance issues. I noticed the bvc_Product table has the "bvin" field set as the primary key with a non-clustered index, where the ID field is clustered and identity.

Is this the default setting? Or has someone prior to me done this on our installation?

I'm seeing simple queries against that table do some strange lookups and nested joins...

Thanks,
Travis
Andy Miller
#2 Posted : Monday, August 31, 2009 8:28:30 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
That is the default setting out of the box.
I don't know why there is an id field at all. I've never seen it used...though I haven' t looked for it either. bvin is used throughout the app.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
Marcus
#3 Posted : Tuesday, September 1, 2009 7:13:36 AM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

The primary key is the bvin field which is a GUID type. The integer id field is there so that new product inserts end up at the last database page. Because GUID values are not sequential a large product import will shuffle all database pages without the sequential int field.

If you think there are performance issues with just selecting products from the table I'd be happy to hear about your findings. Specifically, what type of joins are you seeing when just pulling rows from the table?
travislaborde
#4 Posted : Tuesday, September 1, 2009 7:27:06 AM(UTC)
travislaborde

Rank: Member

Joined: 8/31/2009(UTC)
Posts: 2

Thanks - all analysis so far points to bvc_Product_ByCategory_s as the culprit. This procedure is by far the heaviest hitter on our server.

I'm learning about your "guid as primary key" implications as well. I really need to optimzie that sproc tho.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012