If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Can We create both clustered and clustered indexes on same column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-09-10, 01:19
reddy_546 reddy_546 is offline
Registered User
 
Join Date: May 2010
Location: Hyderabad, India
Posts: 16
Can We create both clustered and Non clustered indexes on same column

I have a table EXT_MEEI_SQL with following info

Column_name Type Length
----------- ---- ----------- -
MEDICAID_ID char 12
MMS_SEQ_NO int 4
SUB_SEQ_NO datetime 8
SQL_LINE1 varchar 255
SQL_LINE2 varchar 255
MESQ_ID numeric (IDENTITY) 9

INDEXES:

index_name (index_keys) index_description
---------- ----------------- ----
EXTX_MESQ_PRIMARY (MESQ_ID) clustered, unique
EXTX_MESQ_ID (MESQ_ID) nonclustered
MEEI_SQL_IDX_MEDMMS (MEDICAID_ID, MMS_SEQ_NO) nonclustered

while inserting data into SQL table deadlock is occurring..Is it because of these clustered and non clustered index on the same column (MESQ_ID)?
__________________
-PavanKumar M Reddy

Last edited by reddy_546; 07-11-10 at 08:13.
Reply With Quote
  #2 (permalink)  
Old 07-12-10, 00:20
agrawal.meet agrawal.meet is offline
Registered User
 
Join Date: Jun 2010
Posts: 51
Why do you have clustered and non-clustered on the same column anyway? I don't see any difference in first 2 constraints apart from 1 being clustered and other being non-clustered.

Also,
Identity cols are not good candidate for clustered index for various reasons. I suggest you have clustered index on combination of unique col(s) and have non-clustered index MESQ_ID.

Thanks,
Meet
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On