473,804 Members | 2,758 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

configuration/load balancing

Hi

On our SQl Server (2000) we can have queries that take at least 10-20mins
(require full table scan fo billion row table). When one of these queries
is running it substantailly slows down very quick queries (sub second
queries take several seconds).

I believe there is no way to set priorities but was wondering if there
are other configuration settings that could help. The server is dual
processor so maybe setting maxdop to 1 will help. Memory size is
dynmaically assigned up to 4Gb but as the DB size is > 1Tb I'm not sure
if allowing this much memory is actually decreasing performance when the
quick query trys to get through.

Any suggestions.

Thanks
Mike
Jan 25 '06 #1
8 1299
Mike Read wrote:
Hi

On our SQl Server (2000) we can have queries that take at least
10-20mins (require full table scan fo billion row table). When one of
these queries is running it substantailly slows down very quick
queries (sub second queries take several seconds).
I don't know your env and its requirements but to me the difference
between sub 1 sec and several seconds doesn't sound worth the effort
changing anything - unless, of course, you have lots of these short
queries executed in sequence and the difference sums up dramatically.
I believe there is no way to set priorities but was wondering if there
are other configuration settings that could help. The server is dual
processor so maybe setting maxdop to 1 will help. Memory size is
dynmaically assigned up to 4Gb but as the DB size is > 1Tb I'm not
sure if allowing this much memory is actually decreasing performance
when the quick query trys to get through.

Any suggestions.


A random list that comes to mind:

- scheduling: make sure the long runners are done during the night or
other time when the DB is mostly idle.

- distribution of data: either via some form of replication or by moving
data from one DB to a complete different system

- optimizing SQL: additional indexes, different query conditions etc.

Cheers

robert

Jan 25 '06 #2
Hi Robert
I don't know your env and its requirements but to me the difference
between sub 1 sec and several seconds doesn't sound worth the effort
changing anything - unless, of course, you have lots of these short
queries executed in sequence and the difference sums up dramatically.

Yes there could well be a lot of the small queries.

- scheduling: make sure the long runners are done during the night or
other time when the DB is mostly idle.

I'm trying to write some sort of queue to help with this but the chances
are there will always be a long running query executing at a given time.
- distribution of data: either via some form of replication or by moving
data from one DB to a complete different system

We're looking at getting another server to handle the long queries
so this might utilmately be the answer
- optimizing SQL: additional indexes, different query conditions etc.


We've pretty much done what we can but some queries will always need a
full table scan.

As all queries run at the same priority I was kind of expecting a
0.1 sec query to take approx 0.2 sec (rather than 10 secs as is happening)
if another (long) query is running.

As this isn't the case I presume there's some sort of
overhead/cache/swapping occuring that I might have been able to
reduce showhow.

Thanks
Mike
Jan 25 '06 #3
Mike Read wrote:
Hi Robert
I don't know your env and its requirements but to me the difference
between sub 1 sec and several seconds doesn't sound worth the effort
changing anything - unless, of course, you have lots of these short
queries executed in sequence and the difference sums up dramatically.


Yes there could well be a lot of the small queries.

- scheduling: make sure the long runners are done during the night or
other time when the DB is mostly idle.


I'm trying to write some sort of queue to help with this but the
chances are there will always be a long running query executing at a
given time.
- distribution of data: either via some form of replication or by
moving data from one DB to a complete different system


We're looking at getting another server to handle the long queries
so this might utilmately be the answer
- optimizing SQL: additional indexes, different query conditions etc.


We've pretty much done what we can but some queries will always need a
full table scan.

As all queries run at the same priority I was kind of expecting a
0.1 sec query to take approx 0.2 sec (rather than 10 secs as is
happening) if another (long) query is running.

As this isn't the case I presume there's some sort of
overhead/cache/swapping occuring that I might have been able to
reduce showhow.


My guess would be that your DB is IO bound during these phases, i.e. the
long running table scans eat up all the IO bandwidth and that's slowing
you down. I'd do some measurements to verify that before you change
anything.

Kind regards

robert

Jan 25 '06 #4

"Mike Read" <ma*@roe.ac.u k> wrote in message
news:Pi******** *************** *********@reaxp 06.roe.ac.uk...
Hi Robert
- distribution of data: either via some form of replication or by moving
data from one DB to a complete different system

We're looking at getting another server to handle the long queries
so this might utilmately be the answer


This may ultimately be your best answer. But...
- optimizing SQL: additional indexes, different query conditions etc.

We've pretty much done what we can but some queries will always need a
full table scan.


Why? I'd suggest perhaps posting some DDLs here. Some folks here can
sometimes do some amazing work.

As all queries run at the same priority I was kind of expecting a
0.1 sec query to take approx 0.2 sec (rather than 10 secs as is happening)
if another (long) query is running.

As this isn't the case I presume there's some sort of
overhead/cache/swapping occuring that I might have been able to
reduce showhow.

Well, generally more RAM is good.

But keep in mind SQL Server 2000 Standard is limited to 2 gig of RAM.

So make sure you're using Enterprise on an OS that will permit use of more
RAM.

I'd highly suggest at least Windows 2003 for your OS and ideally moving to
SQL 2005 to boot.

For example, SQL 2005 Enterprise on Windows 2003 Enterprise can supply up to
64 Gig of RAM. (if you really have money to burn,go to Enterprise for
Itanium Systems.. 1TB of RAM. Oh and send a few checks my way. :-)

Also, you may want to if you haven't already, get more disks and partition
tables accordingly.

For example, if it's only one large table that gets scanned, move it to its
own set of disks. This will isolate the disk I/O.

Thanks
Mike

Jan 25 '06 #5
Hi Greg

We've pretty much done what we can but some queries will always need a
full table scan.

Why? I'd suggest perhaps posting some DDLs here. Some folks here can
sometimes do some amazing work.


The main table is 1 billion rows of about 60 columns, we've indexed on the
most common attributes users might select on but we allow them to mine
the data using arbitary SQL so they might decide to look for an arithmetic
combination of parameters (again some of which we have anticipated and
materialized) or do stats on the columns etc.

Well, generally more RAM is good.

But keep in mind SQL Server 2000 Standard is limited to 2 gig of RAM.

So make sure you're using Enterprise on an OS that will permit use of more
RAM.

I'd highly suggest at least Windows 2003 for your OS and ideally moving to
SQL 2005 to boot.
We're running on Windows 2003 with 4 Gb.

For example, SQL 2005 Enterprise on Windows 2003 Enterprise can supply up to
64 Gig of RAM. (if you really have money to burn,go to Enterprise for
Itanium Systems.. 1TB of RAM. Oh and send a few checks my way. :-)

A bit out of our price range though we could almost cache the table :)
Also, you may want to if you haven't already, get more disks and partition
tables accordingly.

For example, if it's only one large table that gets scanned, move it to its
own set of disks. This will isolate the disk I/O.

Currently we spread all database/tables across 4 RAID volumes to increase
aggregate IO. Initially most queries were accessing the main large table
but the new project DB is currentlty much smaller so there is scope for
some separation

Thanks
Mike
Jan 25 '06 #6
Mike Read (ma*@roe.ac.uk) writes:
On our SQl Server (2000) we can have queries that take at least 10-20mins
(require full table scan fo billion row table). When one of these queries
is running it substantailly slows down very quick queries (sub second
queries take several seconds).

I believe there is no way to set priorities but was wondering if there
are other configuration settings that could help. The server is dual
processor so maybe setting maxdop to 1 will help. Memory size is
dynmaically assigned up to 4Gb but as the DB size is > 1Tb I'm not sure
if allowing this much memory is actually decreasing performance when the
quick query trys to get through.


Setting MAXDOP to 1 will avoid the CPUs being monopolized by huge query,
but a two-way box sounds a bit thin for that amount of data.

However, the main killer here is probably memory. As you scan that 1TB
table, the cached a number of times, and all those small queries must
read from disk. 4GB also sounds a bit thin, then again, 8 or 12 GB is
not going to make that much difference anyway.

A separate server, ot at least a seprate instance for those mean queries
would be a better bet.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jan 25 '06 #7
Hi Erland

A separate server, ot at least a seprate instance for those mean queries
would be a better bet.


Thanks, this sounds like a reasonable way forward.

Mike
Jan 26 '06 #8
Hello,
It sounds like you are creating a "data warehouse." Basically, there
is transactional data, where you are adding, updating, and deleting
data. For this a more normalized data schema is vastly preferred.

However, someday someone wants to pull that data out, and the users are
NOT very sophisticated about learning inner and outer joins to get
their data out.
Mostly they are looking at querying the data and reporting.

If you have a billion rows, you probably have fairly worthwhile
reporting requirements. How would you like to take your 18 minute
queries, and turn them into sub second response time? How about turning
ALL queries against a billion rows into sub second response? Look into
OLAP.

OLAP requires a different mind set. It does not solve all business
requirements, but it can take the vast majority and make them REALLY
fast.
I've implemented several OLAP solutions for various companies. It takes
a large data set to be worthwhile, and at a billion rows you are
probably approaching critical mass where you can't provide data
solutions to your data customers without it.

For grins, create a cube off your main table. You will have something
along the lines of "names of stuff." in your de normalized table. Make
3 or 4 of these "dimensions ." Hopefully these "names of stuff" have no
more then 200-300 variations. Human understood Product names, or
countries or something. Dates are another great Dimension.

You will have numbers. These are frequently dollars, or counts, or
something like that. Make no more then two of these "measures."

It will process once every time you change something, so it takes some
patience to learn how to set it up.
Once you have it set up, it is a LOT faster to query.

Remember how slow it was to do table queries before you had any
indexes? OLAP is a LOT bigger step towards efficiency and speed then
indexes were over raw tables.

drop me a note if you want some help getting it going. I havent' done
one in a while, and i'm getting a little rusty, and would appreciate
being able to help someone get it going.
drmiller 100 at hotmail com

remove spaces!

Jan 30 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5315
by: Max | last post by:
Frankly, i need session variables to persist regardless of load balancing. My hoster says save them in files, yuk. Are there any other thoughts The problem is that the session variables are lost when the load is switched to another server. Also, i am locked out, because there is now a cookie on my PC that will not expire until the timeout has expired? Max
2
4856
by: yagish | last post by:
Hi Techies, Am really new with the Oracle 9i Forms and am searching for a way to perform Load Balancing in Oracle 9i Forms Application. Its not a J2EE application, so cannot go the OC4J way. I need Load Balancing at 2 levels - 1) Load Balancing of the Forms Server 2) Load Balancing of the Database
3
5165
by: Shabam | last post by:
When a web application becomes overloaded with traffic, one can offload it by load balancing and clustering the front end web servers. What happens when the back-end MSSQL database becomes overloaded? Does MYSQL offer load balancing and clustering?
2
2008
by: Christopher D. Wiederspan | last post by:
I'm wondering if anybody could give me some tips on a good webfarm load-balancing solution for an ASP.NET application. Here's the rundown: we've got 3 identical servers that each have identical content. Currently, we're using dns round-robin to load-balance traffic across the servers. I won't go into all of the issues that we've encountered doing it this way, but there are many. We also have the problem of keeping the content synchronized...
6
4070
by: Andrew Robinson | last post by:
I am running two servers with a hardware network load balancing device. I know that to share session information between the two servers I need to implement some type of SQL based session information, but I would simply like to share the SessionID. Mainly for some logging applications. The SessionID does currently seem to be shared between the two servers and I haven't changed anything with my configuration or implemented anything...
0
1553
by: HK | last post by:
I'm wanting to get rid of a hardware load balancer and just use the Windows 2003 software load balancing with 2003 Server Web Edition. I'm wondering if anyone here uploads ASP.NET code to 2 or more servers that are load balanced by Windows Server Network Load Balancing (software load balancing on Windows 2003). If so, or if you're sure of the answer anyway for windows-based load balancing, here's the questions: Can you do just one...
2
2325
by: RahulBose | last post by:
I am trying to implement Load Balancing but facing some problems: A Web farm usually consists of 2 or more computers, orchestrated by some form of load balancing. Consider my scenario: 1. I have an Intranet site say www.intranet.com 2. I arrive at a load balancing machine 3. This machine redirectes me to the machine WebServer01 (contents from www.01.intranet.com are shown) 4. I request another page, for example
3
8655
by: Anthony Smith | last post by:
Can someone point me to a resource or something were I can set this up cleanly. I don't want to re-invest the wheel. I just want the most common way to do this. I know there is a database option and a non- database option. I prefer the none-database option. I will have 2 web servers with PHP installed.
1
2276
by: m.a | last post by:
Hello, I am looking for a hosting solution for my asp.net application. I found that some ISP stated that session states are not preserved in a load balancing system. As I know, if the asp.net is configured to save the session states in SQL server or file system, it would be preserved in load balancing systems. What is the whole story from the hosting point of view?
0
5849
by: amie2008 | last post by:
Hi Folks, I need urgent help with tomcat-apache configuration for load balancing using the mod_proxy module. I have been trying to achieve this configuration: 2 tomcat instances load balanced by front end apache server. I am trying to use the mod_proxy module available with apache. I have successfully loaded the module in httpd.conf file and placed workers.properties file in conf directory. But any changes i make to the httpd.conf...
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.