Here is the query that I am trying to fine tune my indexes for:
Now, take T1 for example... I had an index on part_id, rel_part_num, and mfg_id. It was running pretty slow. So, for farts and giggles, I created a clustered index featuring each of those columns. My question is... Is it better to have clustered index with all three only? clustered index with all three plus three individual indexes? three individual indexes without the cluster?
Are there any other performance considerations that I should consider? Any other approaches to fine tuning indexes besides just adding and removing and waiting to see what happens?
Thanks!
gordon
Code:
SELECT TOP 500
T1.alias_ind,
T2.supplier_ind,
T2.mfg_id,
T1.part_id,
T2.mfg_name,
T1.rel_part_num,
T3.commodity_cd,
T3.family,
T3.part_size,
T4.component_type_desc,
T3.cap_value,
T3.voltage,
T3.cap_tolerance,
T3.temp_coeff,
T3.term_style,
T3.packaging
FROM
psdb_cap_part_dtl T1,
psdb_mfg_tbl T2,
psdb_cap_parameters T3,
psdb_component_type_desc T4,
psdb_mainframe_part_dtl T5
WHERE
T1.part_id IN (select part_id FROM psdb_cap_part_dtl where rel_part_num like 'C0805C106%')
and T1.part_id = T3.part_id
and T1.rel_part_num = T5.mainframe_part_num
and T1.mfg_id = T2.mfg_id
and T2.supplier_ind = 'Y'
and T3.component_type_cd = T4.component_type_cd
Now, take T1 for example... I had an index on part_id, rel_part_num, and mfg_id. It was running pretty slow. So, for farts and giggles, I created a clustered index featuring each of those columns. My question is... Is it better to have clustered index with all three only? clustered index with all three plus three individual indexes? three individual indexes without the cluster?
Are there any other performance considerations that I should consider? Any other approaches to fine tuning indexes besides just adding and removing and waiting to see what happens?
Thanks!
gordon