I've been reading about this option... "optimize for ad hoc workloads"
It appears to be a server level setting, not per DB. The articles I've been reading suggest that it isn't best to test it on a production server.
Well, I've only got a production server, so I'm wanting to really make sure I'm doing the right thing.
When I check cached plans, I've got over 60,000 of them, most compiled plans. Most (~20,000) with only one usecount. Over 50,000 of them have fewer than 100 use counts.
That seems like quite a waste. If I'm reading thigns right, my average plan size is 72k.
SQL
selectavg(cast(size_in_bytesasbigint))fromsys.dm_exec_cached_planscrossapplysys.dm_exec_sql_text(plan_handle)
Is this off the hook? I know I'm taking a deep dive, so I don't expect all my questions to be answered. Good reference material that will help me learn...