Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Tuesday, March 27, 2012

Determine performance issue

I read from a book and part of the comment, it mention this:
========================
After further analysis, we determined that more than
80 percent of the total resources being consumed-processor, memory,
and
input/output (I/O)-was involved in this conversion process.
========================
The conversion process in the comment is the conversion of datetime
format to another format.
QUESTION:
1. How can we determine the percentage of time was involve in
conversion process?
2. How can we check for it? Using profiler?
I'm interested to the method of checking performance problem, but have
no idea where to start with and what to check.
Any guideline?
Thanks.
wodoy.peter
One reliable method is to conduct controled tests to compare the performance
between using the conversion and not using the conversion. This may not be
possible in some scenario, and may be too expensive in some other scenarios.
Without such a comparison, I'm not sure how one can determine with certainty
that X% of resources is being consumed by a conversion step by looking at
perfmon counters or SQL Trace results.
Linchi
"wodoy.peter" wrote:

> I read from a book and part of the comment, it mention this:
> ========================
> After further analysis, we determined that more than
> 80 percent of the total resources being consumed-processor, memory,
> and
> input/output (I/O)-was involved in this conversion process.
> ========================
> The conversion process in the comment is the conversion of datetime
> format to another format.
> QUESTION:
> 1. How can we determine the percentage of time was involve in
> conversion process?
> 2. How can we check for it? Using profiler?
> I'm interested to the method of checking performance problem, but have
> no idea where to start with and what to check.
> Any guideline?
> Thanks.
>
> wodoy.peter
>
|||On Fri, 2 Feb 2007 14:12:01 -0800, Linchi Shea
<LinchiShea@.discussions.microsoft.com> wrote:

>One reliable method is to conduct controled tests to compare the performance
>between using the conversion and not using the conversion. This may not be
>possible in some scenario, and may be too expensive in some other scenarios.
Excellent point, just comment out the line and use the wall clock!
When possible ...

>Without such a comparison, I'm not sure how one can determine with certainty
>that X% of resources is being consumed by a conversion step by looking at
>perfmon counters or SQL Trace results.
Profiler can give you some pretty fine-grained results, if you turn
everything on. It also impacts performance, especially at those
levels.
J.

Determine performance issue

I read from a book and part of the comment, it mention this:
======================== After further analysis, we determined that more than
80 percent of the total resources being consumed-processor, memory,
and
input/output (I/O)-was involved in this conversion process.
========================
The conversion process in the comment is the conversion of datetime
format to another format.
QUESTION:
1. How can we determine the percentage of time was involve in
conversion process?
2. How can we check for it? Using profiler?
I'm interested to the method of checking performance problem, but have
no idea where to start with and what to check.
Any guideline?
Thanks.
wodoy.peterOne reliable method is to conduct controled tests to compare the performance
between using the conversion and not using the conversion. This may not be
possible in some scenario, and may be too expensive in some other scenarios.
Without such a comparison, I'm not sure how one can determine with certainty
that X% of resources is being consumed by a conversion step by looking at
perfmon counters or SQL Trace results.
Linchi
"wodoy.peter" wrote:
> I read from a book and part of the comment, it mention this:
> ========================> After further analysis, we determined that more than
> 80 percent of the total resources being consumed-processor, memory,
> and
> input/output (I/O)-was involved in this conversion process.
> ========================> The conversion process in the comment is the conversion of datetime
> format to another format.
> QUESTION:
> 1. How can we determine the percentage of time was involve in
> conversion process?
> 2. How can we check for it? Using profiler?
> I'm interested to the method of checking performance problem, but have
> no idea where to start with and what to check.
> Any guideline?
> Thanks.
>
> wodoy.peter
>|||On Fri, 2 Feb 2007 14:12:01 -0800, Linchi Shea
<LinchiShea@.discussions.microsoft.com> wrote:
>One reliable method is to conduct controled tests to compare the performance
>between using the conversion and not using the conversion. This may not be
>possible in some scenario, and may be too expensive in some other scenarios.
Excellent point, just comment out the line and use the wall clock!
When possible ...
>Without such a comparison, I'm not sure how one can determine with certainty
>that X% of resources is being consumed by a conversion step by looking at
>perfmon counters or SQL Trace results.
Profiler can give you some pretty fine-grained results, if you turn
everything on. It also impacts performance, especially at those
levels.
J.

Determine performance issue

I read from a book and part of the comment, it mention this:
========================
After further analysis, we determined that more than
80 percent of the total resources being consumed-processor, memory,
and
input/output (I/O)-was involved in this conversion process.
========================
The conversion process in the comment is the conversion of datetime
format to another format.
QUESTION:
1. How can we determine the percentage of time was involve in
conversion process?
2. How can we check for it? Using profiler?
I'm interested to the method of checking performance problem, but have
no idea where to start with and what to check.
Any guideline?
Thanks.
wodoy.peterOne reliable method is to conduct controled tests to compare the performance
between using the conversion and not using the conversion. This may not be
possible in some scenario, and may be too expensive in some other scenarios.
Without such a comparison, I'm not sure how one can determine with certainty
that X% of resources is being consumed by a conversion step by looking at
perfmon counters or SQL Trace results.
Linchi
"wodoy.peter" wrote:

> I read from a book and part of the comment, it mention this:
> ========================
> After further analysis, we determined that more than
> 80 percent of the total resources being consumed-processor, memory,
> and
> input/output (I/O)-was involved in this conversion process.
> ========================
> The conversion process in the comment is the conversion of datetime
> format to another format.
> QUESTION:
> 1. How can we determine the percentage of time was involve in
> conversion process?
> 2. How can we check for it? Using profiler?
> I'm interested to the method of checking performance problem, but have
> no idea where to start with and what to check.
> Any guideline?
> Thanks.
>
> wodoy.peter
>|||On Fri, 2 Feb 2007 14:12:01 -0800, Linchi Shea
<LinchiShea@.discussions.microsoft.com> wrote:

>One reliable method is to conduct controled tests to compare the performanc
e
>between using the conversion and not using the conversion. This may not be
>possible in some scenario, and may be too expensive in some other scenarios.[/vbcol
]
Excellent point, just comment out the line and use the wall clock!
When possible ...
[vbcol=seagreen]
>Without such a comparison, I'm not sure how one can determine with certaint
y
>that X% of resources is being consumed by a conversion step by looking at
>perfmon counters or SQL Trace results.
Profiler can give you some pretty fine-grained results, if you turn
everything on. It also impacts performance, especially at those
levels.
J.

Saturday, February 25, 2012

Designing Primary Key and Clustered Index and Performance

I have several tables where the clustered index (the
physical way the data is stored) is different from the
Primary Key (which is just a unique number). It seems to
me that this will help me the most, as the clustered
index supports my SELECT statements, and the Primary Key
column will support my UPDATE and DELETE statements. I
am very new to SQL Server. My question is this. Is
designing the tables this way ok to do, or is this not
how it should be done?
Second part of my question is, If what I am doing is
fine, then does it make a difference (performance wise)
if I have the Primary Key column the first column table
or about the seventh column in?
Thanks so much for your help.Depends on who you ask. Zealots will say that you should never, ever use an
arbitrary unique integer as a row identifier. I disagree. However,
whenever possible, even if you are using a unique identifier you should
attempt to set a 'natural' primary key based on uniqueness in your data, and
use this for your primary key rather than the row identifier. You can still
use the ID to make life simpler (e.g. passing back lists of rows to client
applications for singleton selection), but the primary key will help
maintain and validate the table's data.
As for location within the column list, it makes no difference where
anything is. Don't rely on the ordering of your column list. Always
specify explicit column lists in the order you want them for selects and
inserts.
"Nancy" <anonymous@.discussions.microsoft.com> wrote in message
news:052b01c3aee5$09ea4e00$a301280a@.phx.gbl...
> I have several tables where the clustered index (the
> physical way the data is stored) is different from the
> Primary Key (which is just a unique number). It seems to
> me that this will help me the most, as the clustered
> index supports my SELECT statements, and the Primary Key
> column will support my UPDATE and DELETE statements. I
> am very new to SQL Server. My question is this. Is
> designing the tables this way ok to do, or is this not
> how it should be done?
> Second part of my question is, If what I am doing is
> fine, then does it make a difference (performance wise)
> if I have the Primary Key column the first column table
> or about the seventh column in?
> Thanks so much for your help.|||Placing the clustered index on a column other than the primary key is often
wise.
You only get ONE clustered index per table so use it wisely (Which is what I
believe you are doing).
If you are new to SQL Server, welcome to the community.
I recommend starting with these 3 books:
1. Inside SQL Server 2000 by Kalen Delaney
2. Professional SQL Server 2000 Programming By Robert Vieira
3. Transact-SQL Programming by Kline
Cheers
Greg Jackson
Portland, OR

Friday, February 17, 2012

design issue: better speed performance by separating into different databases?

Hi,
From my limited knowledge, I think we can gain some speed performance by
breaking up a database out into multiple groups of tables and create one
database for each group - given that I don't care about the relationship as
much. The reason is, each database's dasta is saved down to a physical data
file (not quite, I realize that we can create filegroups) so sometimes
reading and writing operations must get into each other ways and then end up
get serialized by sqlserver automatically. I'm hoping to get some advice
from the experienced people in this area. Would using multiple filegroups
for a single db is better in speed performance than using multiple
databases?
I'm using sqlserver 2005 Enterprise edition.
Thank you for your comment or advice.Zen,
There are a host of approaches for increasing performance of a database
system. Which one/ones to use are dependent on the circumstances and the
performance issues. Many issues can be resolved my careful analysis and
modification of the query and/or indexing. What performance problem are you
experiencing? Can you narrow it down to make the resolution easier to
identify?
HTH
Jerry
"Zen" <zen@.nononospam.com> wrote in message
news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
> Hi,
> From my limited knowledge, I think we can gain some speed performance by
> breaking up a database out into multiple groups of tables and create one
> database for each group - given that I don't care about the relationship
> as much. The reason is, each database's dasta is saved down to a physical
> data file (not quite, I realize that we can create filegroups) so
> sometimes reading and writing operations must get into each other ways and
> then end up get serialized by sqlserver automatically. I'm hoping to get
> some advice from the experienced people in this area. Would using multiple
> filegroups for a single db is better in speed performance than using
> multiple databases?
> I'm using sqlserver 2005 Enterprise edition.
> Thank you for your comment or advice.
>|||I don't have performance issue yet, but I'm just designing a solution that
maximize the read operations - so I'm concerned about the write operations
on the shared resource (physical file etc...). It's a small part of the
bigger design. Modification of the query and indexing will be done on top
of what we can do to avoid resource sharing (if it makes perf difference)
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:eQTxueCgGHA.3860@.TK2MSFTNGP02.phx.gbl...
> Zen,
> There are a host of approaches for increasing performance of a database
> system. Which one/ones to use are dependent on the circumstances and the
> performance issues. Many issues can be resolved my careful analysis and
> modification of the query and/or indexing. What performance problem are
> you experiencing? Can you narrow it down to make the resolution easier to
> identify?
> HTH
> Jerry
> "Zen" <zen@.nononospam.com> wrote in message
> news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> From my limited knowledge, I think we can gain some speed performance by
>> breaking up a database out into multiple groups of tables and create one
>> database for each group - given that I don't care about the relationship
>> as much. The reason is, each database's dasta is saved down to a physical
>> data file (not quite, I realize that we can create filegroups) so
>> sometimes reading and writing operations must get into each other ways
>> and then end up get serialized by sqlserver automatically. I'm hoping to
>> get some advice from the experienced people in this area. Would using
>> multiple filegroups for a single db is better in speed performance than
>> using multiple databases?
>> I'm using sqlserver 2005 Enterprise edition.
>> Thank you for your comment or advice.
>|||Zen wrote:
> I don't have performance issue yet, but I'm just designing a solution that
> maximize the read operations - so I'm concerned about the write operations
> on the shared resource (physical file etc...). It's a small part of the
> bigger design. Modification of the query and indexing will be done on top
> of what we can do to avoid resource sharing (if it makes perf difference)
>
That is absolutely no reason to consider using separate databases. As
Jerry says, there is a whole range of ways to optimize database
performance and all of them are available to you in a single database.
The valid reasons you might need separate databases are if the data has
different requirements for availability, security, backup or for other
administrative issues, not for performance. I'd also add that you are
going about your design the wrong way if you are considering
performance issues before you've planned and tested a logical database
design.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||"Zen" <zen@.nononospam.com> wrote in message
news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
> Hi,
> From my limited knowledge, I think we can gain some speed performance by
> breaking up a database out into multiple groups of tables and create one
> database for each group - given that I don't care about the relationship
> as much. The reason is, each database's dasta is saved down to a physical
> data file (not quite, I realize that we can create filegroups) so
> sometimes reading and writing operations must get into each other ways and
> then end up get serialized by sqlserver automatically. I'm hoping to get
> some advice from the experienced people in this area. Would using multiple
> filegroups for a single db is better in speed performance than using
> multiple databases?
>
Yes. There is absolutely, positively no reason to use multiple databases
for performance reasons.
Filegroups will allow you to slice up the storage any way you want.
But, no offense meant here, your comments reveal a nearly complete lack of
knoledge of SQL Server internals.
Unless you understand the relationship between the Data Files, the Buffer
Cache and the Transaction Log, and how a query is processed, you shouldn't
make design decisions based on performance. Just create a design that is
simple, models your business domain reasonably well and is reasonably
relationally correct, and performance will usually take care of itself. In
fact, even if you do know all the performance details, you still shoudn't
make design decisions based on performance.
To learn more about how SQL Server stores data and processes queries, there
are some OK topic in Books Online.
Write-Ahead Transaction Log
http://msdn2.microsoft.com/en-us/library/ms186259.aspx
I/O Architecture
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_3339.asp
And Inside Microsoft SQL Server 2000 is the standard reference. Inside
Microsoft SQL Server 2005 is in the process of beging released in multiple
volumes.
David|||I guess the key part of of my question is: assuming that logical database
design correction is the same, would it make perf difference if they are
separate in different databases? thanks!
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1148585796.728951.103090@.38g2000cwa.googlegroups.com...
> Zen wrote:
>> I don't have performance issue yet, but I'm just designing a solution
>> that
>> maximize the read operations - so I'm concerned about the write
>> operations
>> on the shared resource (physical file etc...). It's a small part of the
>> bigger design. Modification of the query and indexing will be done on
>> top
>> of what we can do to avoid resource sharing (if it makes perf difference)
> That is absolutely no reason to consider using separate databases. As
> Jerry says, there is a whole range of ways to optimize database
> performance and all of them are available to you in a single database.
> The valid reasons you might need separate databases are if the data has
> different requirements for availability, security, backup or for other
> administrative issues, not for performance. I'd also add that you are
> going about your design the wrong way if you are considering
> performance issues before you've planned and tested a logical database
> design.
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Zen wrote:
> I guess the key part of of my question is: assuming that logical database
> design correction is the same, would it make perf difference if they are
> separate in different databases? thanks!
>
Not really the right question because performance depends on other
factors. Put it this way: using separate databases doesn't give you any
extra options for enhancing performance - for example data can be
partitioned across multiple files even within the same database. So it
would be more accurate to say that you can achieve the same performance
with one database as you can with multiple databases - assuming that
all the other database administration factors are uniform across your
data.
You haven't given us any idea what kind of data volumes you are talking
about. Multiple-terabyte databases are common currency today. If you
are at or approaching terabyte scale however, you should hire some
proper expertise now because mistakes are easily made and can be very
expensive to fix.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Zen,
It "could" in certain situations i.e., distributed partitioned views in a
federation of servers however this is a high-availability solution for
specific demonstrated performance issues and not generally a first pass
optimization technique. I would recommend you stick with one database in
this case.
HTH
Jerry
"Zen" <zen@.nononospam.com> wrote in message
news:O3G$64DgGHA.2456@.TK2MSFTNGP04.phx.gbl...
>I guess the key part of of my question is: assuming that logical database
>design correction is the same, would it make perf difference if they are
>separate in different databases? thanks!
>
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:1148585796.728951.103090@.38g2000cwa.googlegroups.com...
>> Zen wrote:
>> I don't have performance issue yet, but I'm just designing a solution
>> that
>> maximize the read operations - so I'm concerned about the write
>> operations
>> on the shared resource (physical file etc...). It's a small part of the
>> bigger design. Modification of the query and indexing will be done on
>> top
>> of what we can do to avoid resource sharing (if it makes perf
>> difference)
>>
>> That is absolutely no reason to consider using separate databases. As
>> Jerry says, there is a whole range of ways to optimize database
>> performance and all of them are available to you in a single database.
>> The valid reasons you might need separate databases are if the data has
>> different requirements for availability, security, backup or for other
>> administrative issues, not for performance. I'd also add that you are
>> going about your design the wrong way if you are considering
>> performance issues before you've planned and tested a logical database
>> design.
>> --
>> David Portas, SQL Server MVP
>> Whenever possible please post enough code to reproduce your problem.
>> Including CREATE TABLE and INSERT statements usually helps.
>> State what version of SQL Server you are using and specify the content
>> of any error messages.
>> SQL Server Books Online:
>> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
>> --
>|||Jerry Spivey wrote:
> Zen,
> It "could" in certain situations i.e., distributed partitioned views in a
> federation of servers however this is a high-availability solution for
> specific demonstrated performance issues and not generally a first pass
> optimization technique. I would recommend you stick with one database in
> this case.
> HTH
>
Ah, that's a good point. If "separate databases" also means "separate
servers" then there obviously might be a reason for doing it.
The point I was trying to make was this: If you take one database and
naively make an identical copy of that database on the same server then
you won't achieve anything useful. True, you will have created at least
two new files (one data, one log) and depending on the placement of
those files you may perhaps see some performance impact. But then you
might have achieved the same thing by creating those extra files in one
database instead of two. So performance always depends on things other
than the number of databases. As you say, it depends on the number of
servers for instance :-)
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

design issue: better speed performance by separating into different databases?

Hi,
From my limited knowledge, I think we can gain some speed performance by
breaking up a database out into multiple groups of tables and create one
database for each group - given that I don't care about the relationship as
much. The reason is, each database's dasta is saved down to a physical data
file (not quite, I realize that we can create filegroups) so sometimes
reading and writing operations must get into each other ways and then end up
get serialized by sqlserver automatically. I'm hoping to get some advice
from the experienced people in this area. Would using multiple filegroups
for a single db is better in speed performance than using multiple
databases?
I'm using sqlserver 2005 Enterprise edition.
Thank you for your comment or advice.Zen,
There are a host of approaches for increasing performance of a database
system. Which one/ones to use are dependent on the circumstances and the
performance issues. Many issues can be resolved my careful analysis and
modification of the query and/or indexing. What performance problem are you
experiencing? Can you narrow it down to make the resolution easier to
identify?
HTH
Jerry
"Zen" <zen@.nononospam.com> wrote in message
news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
> Hi,
> From my limited knowledge, I think we can gain some speed performance by
> breaking up a database out into multiple groups of tables and create one
> database for each group - given that I don't care about the relationship
> as much. The reason is, each database's dasta is saved down to a physical
> data file (not quite, I realize that we can create filegroups) so
> sometimes reading and writing operations must get into each other ways and
> then end up get serialized by sqlserver automatically. I'm hoping to get
> some advice from the experienced people in this area. Would using multiple
> filegroups for a single db is better in speed performance than using
> multiple databases?
> I'm using sqlserver 2005 Enterprise edition.
> Thank you for your comment or advice.
>|||I don't have performance issue yet, but I'm just designing a solution that
maximize the read operations - so I'm concerned about the write operations
on the shared resource (physical file etc...). It's a small part of the
bigger design. Modification of the query and indexing will be done on top
of what we can do to avoid resource sharing (if it makes perf difference)
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:eQTxueCgGHA.3860@.TK2MSFTNGP02.phx.gbl...
> Zen,
> There are a host of approaches for increasing performance of a database
> system. Which one/ones to use are dependent on the circumstances and the
> performance issues. Many issues can be resolved my careful analysis and
> modification of the query and/or indexing. What performance problem are
> you experiencing? Can you narrow it down to make the resolution easier to
> identify?
> HTH
> Jerry
> "Zen" <zen@.nononospam.com> wrote in message
> news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
>|||Zen wrote:
> I don't have performance issue yet, but I'm just designing a solution that
> maximize the read operations - so I'm concerned about the write operations
> on the shared resource (physical file etc...). It's a small part of the
> bigger design. Modification of the query and indexing will be done on top
> of what we can do to avoid resource sharing (if it makes perf difference)
>
That is absolutely no reason to consider using separate databases. As
Jerry says, there is a whole range of ways to optimize database
performance and all of them are available to you in a single database.
The valid reasons you might need separate databases are if the data has
different requirements for availability, security, backup or for other
administrative issues, not for performance. I'd also add that you are
going about your design the wrong way if you are considering
performance issues before you've planned and tested a logical database
design.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||"Zen" <zen@.nononospam.com> wrote in message
news:%23S0j7ZCgGHA.4004@.TK2MSFTNGP04.phx.gbl...
> Hi,
> From my limited knowledge, I think we can gain some speed performance by
> breaking up a database out into multiple groups of tables and create one
> database for each group - given that I don't care about the relationship
> as much. The reason is, each database's dasta is saved down to a physical
> data file (not quite, I realize that we can create filegroups) so
> sometimes reading and writing operations must get into each other ways and
> then end up get serialized by sqlserver automatically. I'm hoping to get
> some advice from the experienced people in this area. Would using multiple
> filegroups for a single db is better in speed performance than using
> multiple databases?
>
Yes. There is absolutely, positively no reason to use multiple databases
for performance reasons.
Filegroups will allow you to slice up the storage any way you want.
But, no offense meant here, your comments reveal a nearly complete lack of
knoledge of SQL Server internals.
Unless you understand the relationship between the Data Files, the Buffer
Cache and the Transaction Log, and how a query is processed, you shouldn't
make design decisions based on performance. Just create a design that is
simple, models your business domain reasonably well and is reasonably
relationally correct, and performance will usually take care of itself. In
fact, even if you do know all the performance details, you still shoudn't
make design decisions based on performance.
To learn more about how SQL Server stores data and processes queries, there
are some OK topic in Books Online.
Write-Ahead Transaction Log
http://msdn2.microsoft.com/en-us/library/ms186259.aspx
I/O Architecture
http://msdn.microsoft.com/library/d...br />
3339.asp
And Inside Microsoft SQL Server 2000 is the standard reference. Inside
Microsoft SQL Server 2005 is in the process of beging released in multiple
volumes.
David|||I guess the key part of of my question is: assuming that logical database
design correction is the same, would it make perf difference if they are
separate in different databases? thanks!
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1148585796.728951.103090@.38g2000cwa.googlegroups.com...
> Zen wrote:
> That is absolutely no reason to consider using separate databases. As
> Jerry says, there is a whole range of ways to optimize database
> performance and all of them are available to you in a single database.
> The valid reasons you might need separate databases are if the data has
> different requirements for availability, security, backup or for other
> administrative issues, not for performance. I'd also add that you are
> going about your design the wrong way if you are considering
> performance issues before you've planned and tested a logical database
> design.
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||Zen wrote:
> I guess the key part of of my question is: assuming that logical database
> design correction is the same, would it make perf difference if they are
> separate in different databases? thanks!
>
Not really the right question because performance depends on other
factors. Put it this way: using separate databases doesn't give you any
extra options for enhancing performance - for example data can be
partitioned across multiple files even within the same database. So it
would be more accurate to say that you can achieve the same performance
with one database as you can with multiple databases - assuming that
all the other database administration factors are uniform across your
data.
You haven't given us any idea what kind of data volumes you are talking
about. Multiple-terabyte databases are common currency today. If you
are at or approaching terabyte scale however, you should hire some
proper expertise now because mistakes are easily made and can be very
expensive to fix.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Zen,
It "could" in certain situations i.e., distributed partitioned views in a
federation of servers however this is a high-availability solution for
specific demonstrated performance issues and not generally a first pass
optimization technique. I would recommend you stick with one database in
this case.
HTH
Jerry
"Zen" <zen@.nononospam.com> wrote in message
news:O3G$64DgGHA.2456@.TK2MSFTNGP04.phx.gbl...
>I guess the key part of of my question is: assuming that logical database
>design correction is the same, would it make perf difference if they are
>separate in different databases? thanks!
>
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:1148585796.728951.103090@.38g2000cwa.googlegroups.com...
>|||Jerry Spivey wrote:
> Zen,
> It "could" in certain situations i.e., distributed partitioned views in a
> federation of servers however this is a high-availability solution for
> specific demonstrated performance issues and not generally a first pass
> optimization technique. I would recommend you stick with one database in
> this case.
> HTH
>
Ah, that's a good point. If "separate databases" also means "separate
servers" then there obviously might be a reason for doing it.
The point I was trying to make was this: If you take one database and
naively make an identical copy of that database on the same server then
you won't achieve anything useful. True, you will have created at least
two new files (one data, one log) and depending on the placement of
those files you may perhaps see some performance impact. But then you
might have achieved the same thing by creating those extra files in one
database instead of two. So performance always depends on things other
than the number of databases. As you say, it depends on the number of
servers for instance :-)
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Tuesday, February 14, 2012

Design and Performance Question

Hi,

I have a basic DB design question.

First, my application has 100's of customers, all of which will be adding thousands of records each day.

My question is, because of the eventual size of some of these tables, should I have a separate DB for each customer or should I design one DB to hold all customers?

I am worried about some of the massive joins that will eventually take place, also what if I have to do a restore on just one customer's data.

So what should I do, one massive DB, or one DB per customer?

Thanks for you input!

SQL Server is quite capable of handling tables with millions of rows of data. Properly indexed and maintained, performance should not be a big problem. Managing hundreds of databases, however, could become quite wieldly.

The only reason I'd separate customers into their own databases would be for security reasons in the event that each customer directly accessed their data through some web-based application. In that event it's more secure to keep each customer to its own database, preventing inadvertent access to another customer's data.

Design and Performance question

Hi
I'm working now on a project that is Database oriented, and this
Database is so big and has millions of records, my question is:
Where must I put the business logic?
1- Client side: where client is responsible for the business logic.
2- Server Side: exceute the business logic in the server using stored
procedures and triggers...
3- Hybrid schema load balancing on the two sides.
I'm using MS.SQL Server2000
I have many of very complex queries, and many of complex views.
and finally can I depend on Jobs in MS.SQL Server in some tasks with
out impact the perfermance down.
Please reply ASAP
thanks a lot.
I try to put it where it is best suited.
Anything set based which acts on a large amount of data should be in stored
procs or performance will suffer.
Always interface with the db via SPs as you can monitor and correct problems
and change the database tructure without changing anything outside the db.
Anything not set based is up to you and may just depend on the avalability
of development expertise.
You can rely on jobs. Whether they mipact anything depends on what they do.
"Yousef Absee" wrote:

> Hi
> I'm working now on a project that is Database oriented, and this
> Database is so big and has millions of records, my question is:
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
> Please reply ASAP
> thanks a lot.
>
|||"Yousef Absee" <youstec@.gmail.com> wrote in message
news:1131554866.394769.115640@.g47g2000cwa.googlegr oups.com...
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
In the bizClasses that are called by the GUI and directly interact with the
db. If that is via metaData it's even better.

> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
Well sure, These rules may not be business rules but basic data handeling
instead. Triggers that generate data in other tables for necessary reasons
is a good thing.

> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
Depends on what the job is to do and what is happening at the same time?

Design and Performance question

Hi
I'm working now on a project that is Database oriented, and this
Database is so big and has millions of records, my question is:
Where must I put the business logic?
1- Client side: where client is responsible for the business logic.
2- Server Side: exceute the business logic in the server using stored
procedures and triggers...
3- Hybrid schema load balancing on the two sides.
I'm using MS.SQL Server2000
I have many of very complex queries, and many of complex views.
and finally can I depend on Jobs in MS.SQL Server in some tasks with
out impact the perfermance down.
Please reply ASAP
thanks a lot.I try to put it where it is best suited.
Anything set based which acts on a large amount of data should be in stored
procs or performance will suffer.
Always interface with the db via SPs as you can monitor and correct problems
and change the database tructure without changing anything outside the db.
Anything not set based is up to you and may just depend on the avalability
of development expertise.
You can rely on jobs. Whether they mipact anything depends on what they do.
"Yousef Absee" wrote:
> Hi
> I'm working now on a project that is Database oriented, and this
> Database is so big and has millions of records, my question is:
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
> Please reply ASAP
> thanks a lot.
>|||"Yousef Absee" <youstec@.gmail.com> wrote in message
news:1131554866.394769.115640@.g47g2000cwa.googlegroups.com...
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
In the bizClasses that are called by the GUI and directly interact with the
db. If that is via metaData it's even better.
> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
Well sure, These rules may not be business rules but basic data handeling
instead. Triggers that generate data in other tables for necessary reasons
is a good thing.
> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
Depends on what the job is to do and what is happening at the same time?

Design and Performance question

Hi
I'm working now on a project that is Database oriented, and this
Database is so big and has millions of records, my question is:
Where must I put the business logic?
1- Client side: where client is responsible for the business logic.
2- Server Side: exceute the business logic in the server using stored
procedures and triggers...
3- Hybrid schema load balancing on the two sides.
I'm using MS.SQL Server2000
I have many of very complex queries, and many of complex views.
and finally can I depend on Jobs in MS.SQL Server in some tasks with
out impact the perfermance down.
Please reply ASAP
thanks a lot.I try to put it where it is best suited.
Anything set based which acts on a large amount of data should be in stored
procs or performance will suffer.
Always interface with the db via SPs as you can monitor and correct problems
and change the database tructure without changing anything outside the db.
Anything not set based is up to you and may just depend on the avalability
of development expertise.
You can rely on jobs. Whether they mipact anything depends on what they do.
"Yousef Absee" wrote:

> Hi
> I'm working now on a project that is Database oriented, and this
> Database is so big and has millions of records, my question is:
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
> Please reply ASAP
> thanks a lot.
>|||"Yousef Absee" <youstec@.gmail.com> wrote in message
news:1131554866.394769.115640@.g47g2000cwa.googlegroups.com...
> Where must I put the business logic?
> 1- Client side: where client is responsible for the business logic.
In the bizClasses that are called by the GUI and directly interact with the
db. If that is via metaData it's even better.

> 2- Server Side: exceute the business logic in the server using stored
> procedures and triggers...
Well sure, These rules may not be business rules but basic data handeling
instead. Triggers that generate data in other tables for necessary reasons
is a good thing.

> 3- Hybrid schema load balancing on the two sides.
> I'm using MS.SQL Server2000
> I have many of very complex queries, and many of complex views.
> and finally can I depend on Jobs in MS.SQL Server in some tasks with
> out impact the perfermance down.
Depends on what the job is to do and what is happening at the same time?