SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Allocate memory to SELECT statement in sql server 2005


Allocate memory to SELECT statement in sql server 2005

Author
Message
beejug1983
beejug1983
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1444 Visits: 1482
Hi all,

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

Thanks in advance.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)

Group: General Forum Members
Points: 219141 Visits: 46279
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, MVP, M.Sc (Comp Sci)
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


sachnam
sachnam
SSC-Addicted
SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)SSC-Addicted (491 reputation)

Group: General Forum Members
Points: 491 Visits: 500
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...
beejug1983
beejug1983
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1444 Visits: 1482
Actually it was interview question.
beejug1983
beejug1983
UDP Broadcaster
UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)UDP Broadcaster (1.4K reputation)

Group: General Forum Members
Points: 1444 Visits: 1482
Actually it was interview question.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)SSC Guru (219K reputation)

Group: General Forum Members
Points: 219141 Visits: 46279
Then the answer is simple - you can't.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
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


Sachin Nandanwar
Sachin Nandanwar
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1527 Visits: 2633
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 .

--------------------------------------------------------------------------------------------------
I am just an another naive wannabe DBA trying to learn SQL Server
Peter Trast
Peter Trast
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1050 Visits: 655
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? Smile

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
sqlbuddy123
sqlbuddy123
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 5982 Visits: 2243
You can't allocate memory at the individual query level.

Thank You,

Best Regards,
SQLBuddy
Peter Trast
Peter Trast
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1050 Visits: 655
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. Smile

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

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
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