Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

What does SQL Server do when memory is low?
We see some odd things in our DW from time to time.  When a query is
submitted that needs more memory than what is available in SQL to perform
something like a large join, what does the engine do?  I can only imagine it
can do one of three things.

Wait for other processes to release enough memory
Break the requested process down into smaller but less efficient processing
methods
Somehow make more memory available by scaling back other processes.

Occasionally in our DW we see large queries that are running (ie. consuming
CPU and DiskIO) that normally run for a short duration but sometimes run for
many times longer.  When this occurs we generally look at available CPU,
disk queuing, and sysprocesses.

In the clearest example we recently experienced the following:

Using two identical 16 way 64 bit servers (MDOP=4, 32GB ram, SQL build
1014), one running production the other idle.   We had a scenario where in
production there were four large stored procedures running.  Disk and CPU
utilization were in the 20% range.  We then started a 80 million row select
into.  The source of which was two moderately complex select statements
together with a union.  After running for three hours disk IO had steadily
risen but the task had not finished.  We killed it and restarted the same
query on production and after an hour killed it a second time.  Before the
third attempt we killed several of the processes that had been running most
of the day.  The third attempt we started the same query on both servers.
The idle server finished in 40 minutes and the production finished about 5
minutes later.  While the estimated query plans were always the same the
behavior in sysprocesses between the long runs and the short run were very
different.  There was no indication of a blocking or unyielding schedulers.

Thoughts and suggestions?

Thanks,
Danny



Report this thread to moderator Post Follow-up to this message
Old Post
Danny
08-31-05 02:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:44 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006