Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Fun with sp_executeSQL


Fun with sp_executeSQL

Author
Message
pbarbin
pbarbin
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 349
Great article David. I was going to ask the same question about proc cache limits, but I have heard about the "stolen pages" concept too. So, it might be that there is a limit, but still keeping the proc cache lower does give data cache more room.

I think the option to "optimize for adhoc workloads" will reduce the proc cache as I believe it stubs out the entry in the cache but doesn't actually take up all the space until the usecount moves to 2. That keeps all those "1 timers" from filling it up.

Entity Framework has exhibited some of the same problems as nHibernate. Good news, they have fixed a number of them in the latest version, but what might be worth researching is index usage. When the parameter datatype given doesn't match the datatype of the column that it's being compared to, I am pretty sure Sql Server gives up on obvious index options. So be careful what datatypes the developers are giving the params.
SAinCA
SAinCA
SSC-Enthusiastic
SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)

Group: General Forum Members
Points: 143 Visits: 683
Post deleted.
chrisfradenburg
chrisfradenburg
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1732 Visits: 2057
pbarbin (1/31/2012)
...what might be worth researching is index usage. When the parameter datatype given doesn't match the datatype of the column that it's being compared to, I am pretty sure Sql Server gives up on obvious index options. So be careful what datatypes the developers are giving the params.


That's due to implicit conversion and whether or not it results in an index not being properly used has to do with data type precedence. If the index is on something lower on the list (such as varchar) and you pass in something higher (such as int) then SQL is going to convert the value for every row from varchar to int before doing the comparison resulting in a scan. If it's the other way around (index on int and you're passing in varchar) then the implicit conversion will happen on the parameter and you can still get a seek. However, it is best to make sure the data types match so you don't need to worry about implicit conversions at all.
Cliff Jones
Cliff Jones
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4069 Visits: 3648
ganci.mark (1/31/2012)
Great article David. Thank you.

I thought that there were limits imposed on the various memory components based on on the total amount of memory given to SQL Server.

For example: Proc Cache limits
SQL Server 2005 SP2
75% of server memory from 0-4GB +
10% of server memory from 4Gb-64GB +
5% of server memory > 64GB
So 14GB given to a SQL SERVER 2005 SP2 would yield a 4GB Proc Cache.

Is it correct in stating that the limits do not exist and proc cache for example can consume additional memory?

Thanks
Mark




This is my understanding as well.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search