|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: 2 days ago @ 2:18 AM
Points: 264,
Visits: 1,288
|
|
Hi all,
I have a SELECT query. How can I allocate part of memory to this SELECT statement. Kindly reply soon.
Thanks in advance.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744,
Visits: 30,025
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 9:02 AM
Points: 159,
Visits: 470
|
|
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...
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: 2 days ago @ 2:18 AM
Points: 264,
Visits: 1,288
|
|
| Actually it was interview question.
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: 2 days ago @ 2:18 AM
Points: 264,
Visits: 1,288
|
|
| Actually it was interview question.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 3:18 PM
Points: 37,744,
Visits: 30,025
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:14 AM
Points: 238,
Visits: 2,341
|
|
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 .
|
|
|
|
|
Mr 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
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 3:17 PM
Points: 715,
Visits: 1,524
|
|
You can't allocate memory at the individual query level.
Thank You,
Best Regards, SQLBuddy
|
|
|
|
|
Mr 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
|
|
|
|