![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
1 million row table PK field_id (int) IX nonclustered scheme_id (int), is_calc (bit). Not a covering index. I have run DBCC FREEPROCCACHE, DBCC CHECKTABLE (it took 6 minutes), UPDATE STATISTICS and DBCC CHECKUSAGE on the table. I have also rebuilt all the indexes. Without a query hint it runs a table scan which seems to hang (or take forever). With the query hint below, it comes up with a decent execution plan (use nonclustered index and then key lookup), but still takes ~5 seconds... to return nothing!!!! There are no matches, so it shouldn't even need to do the lookup, which means it's taking 5 seconds to access the nonclustered index! This should be executing in 1ms! SELECT field_id, rft.is_calc_print AS fieldiscalcprint, rft.table_id AS tableid, field_name, translation, data_type, class_variable_result, special_format, constant_value, net_class_variable_path FROM report_field_translation rft WITH (INDEX(IX_report_field_translation_scheme_id_is_ca lc_print)) WHERE scheme_id = 253 AND is_calc_print = 1 ORDER BY field_name |
#3
| |||
| |||
|
|
SQL Server 2008 R2 1 million row table PK field_id (int) IX nonclustered scheme_id (int), is_calc (bit). Not a covering index. How selective is scheme_id? If you have 1 million rows and (say) 5 different |
|
With the query hint below, it comes up with a decent execution plan (use nonclustered index and then key lookup), but still takes ~5 seconds... to return nothing!!!! |
|
SELECT field_id, rft.is_calc_print AS fieldiscalcprint, rft.table_id AS tableid, field_name, translation, data_type, class_variable_result, special_format, constant_value, net_class_variable_path FROM report_field_translation rft WITH (INDEX(IX_report_field_translation_scheme_id_is_ca lc_print)) WHERE scheme_id = 253 AND is_calc_print = 1 ORDER BY field_name is_calc_print is not the same as is_calc (unless you made a typo). |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
I have asked for the server memory to be upped 44GB as 3 of the instances that I know about need 6GB each. I don't have any usage stats on the relative load of the instances. Would we get away with setting min server memory to something like 5GB on all instances, or would you advise sharing out the memory using max server memory? |
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Can you explain why I should use max server memory rather than min? As I understand it, that would prevent the more heavily used instances being able to use free memory above their max allocation even if the other instances aren't using it? Whereas min would avoid memory being taken from some instances to give to other instances and allow some memory management features to kick in? I imagine I'm being naive? |
|
Also should we use the keep locked in memory option? How much memory should we allow per instance in addition to max memory setting? |
#9
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |