B
Bob Day
Using vs 2003, vb.net, sql msde
Using Server Explorer, Design Table design a table with only a Primary
Index.
Example with 4 columns (but no index created for them, except primary key).
Table PINS
Primary Key, autoincrement
IX_PINS, string
IX_Role_Number, String
IX_Outbound_Calling_Status, string
Using Component Designer, I will Create a DataAdatapter with a 'covering'
select statement. I can selectively drop % into the statement below to
'ignore' any one of the three @variables.
Example of where section:
WHERE (PINS.fld_IX_PIN LIKE @PIN) AND (PINS.fld_IX_Role_Number LIKE
@ROLE_NUMBER) AND (PINS.fid_IX_Outbound_Calling_Status_Number LIKE
@OUTBOUND_CALLING_STATUS_NUMBER)
Here is my question. The above works fine with no indexes defined in Design
Table (i.e. the underlying datasource), but I suspect I am taking a
performance hit. When I design the table, how should the indexes be
designed to maximize the performance of the DataAdapter?
Scenario one: Design 3 different indexes, each one being on one indexed
column. This is easy to do, but I am not sure it helps the DataAdapter if
it uses multiple columns. But it seems the only possible option, because it
would allow me to define PIN as Unique Index, while the other two as not
unique.
Scenario two: Design 1 index with all index columns, starting with the
narrower columns first. This would amount to a 'covering' index (i.e
something like Outbound_Calling_StatusNumber+Role_Number+PIN). Logically,
this would be best for the DataAdapter (both covering), but doesn't seem
possible since I could not define PIN alone as a Unique index with the other
two not being unique.
Scenario three: Design as many indexes as possible, one each to match a
possible combinations of the 'covering' data adapter. Each index would have
multiple columns. For example, one index might be PIN, another PIN + Role,
another PIN+Role+Outbound Calling Status Number. This doesn't seem
practical since it would require predicting all possible combinations of the
use of the DataAdapater in advance.
Please advise.
Bob Day
Using Server Explorer, Design Table design a table with only a Primary
Index.
Example with 4 columns (but no index created for them, except primary key).
Table PINS
Primary Key, autoincrement
IX_PINS, string
IX_Role_Number, String
IX_Outbound_Calling_Status, string
Using Component Designer, I will Create a DataAdatapter with a 'covering'
select statement. I can selectively drop % into the statement below to
'ignore' any one of the three @variables.
Example of where section:
WHERE (PINS.fld_IX_PIN LIKE @PIN) AND (PINS.fld_IX_Role_Number LIKE
@ROLE_NUMBER) AND (PINS.fid_IX_Outbound_Calling_Status_Number LIKE
@OUTBOUND_CALLING_STATUS_NUMBER)
Here is my question. The above works fine with no indexes defined in Design
Table (i.e. the underlying datasource), but I suspect I am taking a
performance hit. When I design the table, how should the indexes be
designed to maximize the performance of the DataAdapter?
Scenario one: Design 3 different indexes, each one being on one indexed
column. This is easy to do, but I am not sure it helps the DataAdapter if
it uses multiple columns. But it seems the only possible option, because it
would allow me to define PIN as Unique Index, while the other two as not
unique.
Scenario two: Design 1 index with all index columns, starting with the
narrower columns first. This would amount to a 'covering' index (i.e
something like Outbound_Calling_StatusNumber+Role_Number+PIN). Logically,
this would be best for the DataAdapter (both covering), but doesn't seem
possible since I could not define PIN alone as a Unique index with the other
two not being unique.
Scenario three: Design as many indexes as possible, one each to match a
possible combinations of the 'covering' data adapter. Each index would have
multiple columns. For example, one index might be PIN, another PIN + Role,
another PIN+Role+Outbound Calling Status Number. This doesn't seem
practical since it would require predicting all possible combinations of the
use of the DataAdapater in advance.
Please advise.
Bob Day