-
I have the a table with colA and colB and composite Primary Key. Based on the data below, which pattern would be efficient in terms of performance. Should the PK be
(colA, colB) OR (colB, colA) ???
Pattern A
========
colA colB
1 101
1 102
2 101
2 102
3 101
3 102
Pattern B
========
colB colA
101 1
101 2
102 1
102 2
103 1
103 2
[Edited by rpardip on 01-25-2001 at 05:51 PM]
-
-
Query will have both the columns in the WHERE clause with AND operator.
-
In that case, I don't think the order matters.
But with the "index compression", depends on the cardinality of the column, it may take less or more space, if the order is changed (not sure how much impact, it has on the performance)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|