View previous topic :: View next topic
|
Author |
Message |
ramfrom84
New User
Joined: 23 Aug 2006 Posts: 93 Location: chennai
|
|
|
|
Hi All,
In my table contains Six primary key.
I have value for three primary key.
What would be better Choice 1 or 2 , (consider the performance also)
1. Select query with three key value
2. Select query with any one key value |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your request is quite unclear.
Please post the parts of the table definition that are involved with your question as well as sample queries that you are asking about. |
|
Back to top |
|
|
ramfrom84
New User
Joined: 23 Aug 2006 Posts: 93 Location: chennai
|
|
|
|
Hi All,
Imagine the table with six primary key as general...
The table contains Six primary key. I have value for three primary key.
What would be better Choice 1 or 2 , (consider the performance also)
1. Select query with three primary key value
2. Select query with any one key value |
|
Back to top |
|
|
Naresh Kumar Reddy P
New User
Joined: 24 May 2007 Posts: 8 Location: Bangalore
|
|
|
|
Still your explanation is not clear. Can please give us an example?
Quote: |
Imagine the table with six primary key as general... |
By this do u mean primary key is the combination of six fields?
If it is the case, selecting the table based on the full primary key will always be the right choice on performance basis. The less u give the values for primary key, the lesser in the performance as well.
Thanks
Reddy |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please provide the requested information.
Re-posting the original unclear request will get few useful replies.
We can provide suggestions, but you have to present something more solid to work with. |
|
Back to top |
|
|
munikumar Currently Banned New User
Joined: 18 Apr 2007 Posts: 24 Location: India
|
|
|
|
As per my knowledge, if your table is vast in size then better to select with three primary key values.
But there is one problem, the number of index scans will be more, this leads to performance degradation. |
|
Back to top |
|
|
|