Hi All.
I have a main table (call it Orders) which has approximately 60 columns and over 1 million records (and growing). Of these 60 columns, approximately 25 are IDs which reference a lookup table for values that define numerous categories and types for each order. Each of these categories and types are required information. The problem is that every time I write a stored procedure against this table, I am using anywhere from 12-25 joins to return all of the necessary information. My questions are:
Is this an unacceptable number of joins in a single query? What is the best practice for reducing the number of joins? - I'd hate to denormalize but I would consider it if its the only option.
Any advice or tips would be greatly appreciated.
Thanks.
I have a main table (call it Orders) which has approximately 60 columns and over 1 million records (and growing). Of these 60 columns, approximately 25 are IDs which reference a lookup table for values that define numerous categories and types for each order. Each of these categories and types are required information. The problem is that every time I write a stored procedure against this table, I am using anywhere from 12-25 joins to return all of the necessary information. My questions are:
Is this an unacceptable number of joins in a single query? What is the best practice for reducing the number of joins? - I'd hate to denormalize but I would consider it if its the only option.
Any advice or tips would be greatly appreciated.
Thanks.