Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Allocate memory to SELECT statement in sql server 2005 Expand / Collapse
Author
Message
Posted Tuesday, January 11, 2011 11:33 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 273, Visits: 1,431
Hi all,

I have a SELECT query. How can I allocate part of memory to this SELECT statement.
Kindly reply soon.

Thanks in advance.
Post #1046276
Posted Tuesday, January 11, 2011 11:37 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:55 PM
Points: 41,570, Visits: 34,495
SQL manages memory for queries itself. What are you trying to do here that you want memory allocated?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1046278
Posted Tuesday, January 11, 2011 11:42 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, March 31, 2014 4:12 AM
Points: 159, Visits: 489
beejug1983 (1/11/2011)

how can I allocate part of memory to this SELECT statement


I don;t think there is any way in sql server in any version\Edtion which will allow to allocate or define a quota for a query.

my question is why do you want such thing to happen?

sql server has a reserved memory space known as buffer cache which is divided majorily into 2 parts
data cache and procedure cache .

and how much and how less depends on the configurtion of minimun and maximun server memory setting under sp_configure.

pls. eloborate your requirement a bit more clearly...

Post #1046283
Posted Wednesday, January 12, 2011 2:18 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 273, Visits: 1,431
Actually it was interview question.
Post #1046328
Posted Wednesday, January 12, 2011 2:18 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 273, Visits: 1,431
Actually it was interview question.
Post #1046329
Posted Wednesday, January 12, 2011 2:37 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:55 PM
Points: 41,570, Visits: 34,495
Then the answer is simple - you can't.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1046337
Posted Wednesday, January 12, 2011 3:53 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, April 18, 2014 11:10 PM
Points: 240, Visits: 2,391
It can be done for a particular login using resource governer but not for a query or a SP.What you do basically is create resource pool and assign that resource pool to that particular login.

So any query or SP that is run with that particular login will only have memory resources defined in resource governer .
Post #1046368
Posted Thursday, January 13, 2011 11:37 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, March 15, 2013 10:35 AM
Points: 594, Visits: 654
Sachin Nandanwar (1/12/2011)
It can be done for a particular login using resource governer but not for a query or a SP.What you do basically is create resource pool and assign that resource pool to that particular login.

So any query or SP that is run with that particular login will only have memory resources defined in resource governer .


Just remember that Resource Governor is new to SQL Server 2008 and this is a 2005 question.
Maybe it is time to upgrade? :)

And this is exactly the kind of thing it was made for
http://technet.microsoft.com/en-us/library/bb895232.aspx

And only CPU and memory can be governed, by a percentage of the total, with a minimum and maximum for each workload definition. This is definitely a feature worth upgrading to 2008 for.


Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Post #1047476
Posted Thursday, January 13, 2011 11:52 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 8:52 AM
Points: 1,192, Visits: 2,176
You can't allocate memory at the individual query level.

Thank You,

Best Regards,
SQLBuddy
Post #1047484
Posted Thursday, January 13, 2011 1:54 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, March 15, 2013 10:35 AM
Points: 594, Visits: 654
sqlbuddy123 (1/13/2011)
You can't allocate memory at the individual query level.

Thank You,

Best Regards,
SQLBuddy


You are correct that there is no classifier for a t-sql DEFINITION of an adhoc query, but I COULD govern a specific query if it has properties that can be defined by a classifier function, such as a LOGIN_PROPERTY, SUSER_NAME, etc, and it was the ONLY query that ever used this classifier property. Then you could allocate memory for a specific query because the classifier property is used only by that query. Splitting hairs, I know, but still true. So you would create a specific login that was only used to run that one query.

Cannot is too broad. There are often many ways to do things which "cannot" be done. :)

"Those who say it cannot be done shouldn't interrupt the people doing it" --
Ancient Chinese Proverb... supposedly :)


Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Post #1047566
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse