Showing posts with label via. Show all posts
Showing posts with label via. Show all posts

Wednesday, March 28, 2012

Performance gain

How much of a performance gain I can get on 1.2 million rows insert via DTS
package If I,
- Drop 1 clustered and 2 non-clustered index on the table I am loading
- 2-3 foreign keys referencing other tables
- Replace the delete table with truncate table
- Do a bulk insert
- Re-create the indexes
- Re-create the foreign keys
Thanks for any input.
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
>
Well best way will be to try it. ;-)
BUT, in my experience what you're doing will help.

> - Drop 1 clustered and 2 non-clustered index on the table I am loading
This helps, but mostly if the imported data is already sorted on the
clustered index. Otherwise, rebuilding the clustered index may eat up any
savings.

> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
HUGE help

> - Do a bulk insert
Definitely faster w/o indices.

> - Re-create the indexes
> - Re-create the foreign keys
>
In general you should see a big improvement, especially if the clustered
index doesn't have to do much data movement.

> Thanks for any input.
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
|||You have given us too little data to assist you properly. The biggest thing
missing is how many rows are ALREADY in the table and how many rows are in
the referencing tables?
In general if you are inserting an amount that is a reasonably large
fraction of the total rows already in the table, then it is better to
drop/rebuild. But in this case if your table already has a billion rows,
adding 1.2 million would be much faster keeping things as they are.
TheSQLGuru
President
Indicium Resources, Inc.
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
> - Drop 1 clustered and 2 non-clustered index on the table I am loading
> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
> - Do a bulk insert
> - Re-create the indexes
> - Re-create the foreign keys
> Thanks for any input.
|||On Thu, 10 May 2007 09:10:01 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:

>How much of a performance gain I can get on 1.2 million rows insert via DTS
>package If I,
>- Drop 1 clustered and 2 non-clustered index on the table I am loading
>- 2-3 foreign keys referencing other tables
>- Replace the delete table with truncate table
>- Do a bulk insert
>- Re-create the indexes
>- Re-create the foreign keys
>Thanks for any input.
Besides two good answers already, how long does it take now?
J.

Performance gain

How much of a performance gain I can get on 1.2 million rows insert via DTS
package If I,
- Drop 1 clustered and 2 non-clustered index on the table I am loading
- 2-3 foreign keys referencing other tables
- Replace the delete table with truncate table
- Do a bulk insert
- Re-create the indexes
- Re-create the foreign keys
Thanks for any input."DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
>
Well best way will be to try it. ;-)
BUT, in my experience what you're doing will help.

> - Drop 1 clustered and 2 non-clustered index on the table I am loading
This helps, but mostly if the imported data is already sorted on the
clustered index. Otherwise, rebuilding the clustered index may eat up any
savings.

> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
HUGE help

> - Do a bulk insert
Definitely faster w/o indices.

> - Re-create the indexes
> - Re-create the foreign keys
>
In general you should see a big improvement, especially if the clustered
index doesn't have to do much data movement.

> Thanks for any input.
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||You have given us too little data to assist you properly. The biggest thing
missing is how many rows are ALREADY in the table and how many rows are in
the referencing tables'
In general if you are inserting an amount that is a reasonably large
fraction of the total rows already in the table, then it is better to
drop/rebuild. But in this case if your table already has a billion rows,
adding 1.2 million would be much faster keeping things as they are.
TheSQLGuru
President
Indicium Resources, Inc.
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
> - Drop 1 clustered and 2 non-clustered index on the table I am loading
> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
> - Do a bulk insert
> - Re-create the indexes
> - Re-create the foreign keys
> Thanks for any input.|||On Thu, 10 May 2007 09:10:01 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:

>How much of a performance gain I can get on 1.2 million rows insert via DTS
>package If I,
>- Drop 1 clustered and 2 non-clustered index on the table I am loading
>- 2-3 foreign keys referencing other tables
>- Replace the delete table with truncate table
>- Do a bulk insert
>- Re-create the indexes
>- Re-create the foreign keys
>Thanks for any input.
Besides two good answers already, how long does it take now?
J.

Performance gain

How much of a performance gain I can get on 1.2 million rows insert via DTS
package If I,
- Drop 1 clustered and 2 non-clustered index on the table I am loading
- 2-3 foreign keys referencing other tables
- Replace the delete table with truncate table
- Do a bulk insert
- Re-create the indexes
- Re-create the foreign keys
Thanks for any input."DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
>
Well best way will be to try it. ;-)
BUT, in my experience what you're doing will help.
> - Drop 1 clustered and 2 non-clustered index on the table I am loading
This helps, but mostly if the imported data is already sorted on the
clustered index. Otherwise, rebuilding the clustered index may eat up any
savings.
> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
HUGE help
> - Do a bulk insert
Definitely faster w/o indices.
> - Re-create the indexes
> - Re-create the foreign keys
>
In general you should see a big improvement, especially if the clustered
index doesn't have to do much data movement.
> Thanks for any input.
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||You have given us too little data to assist you properly. The biggest thing
missing is how many rows are ALREADY in the table and how many rows are in
the referencing tables'
In general if you are inserting an amount that is a reasonably large
fraction of the total rows already in the table, then it is better to
drop/rebuild. But in this case if your table already has a billion rows,
adding 1.2 million would be much faster keeping things as they are.
--
TheSQLGuru
President
Indicium Resources, Inc.
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:72D6D8E4-6F94-4DB9-A93E-F67F07F3D277@.microsoft.com...
> How much of a performance gain I can get on 1.2 million rows insert via
> DTS
> package If I,
> - Drop 1 clustered and 2 non-clustered index on the table I am loading
> - 2-3 foreign keys referencing other tables
> - Replace the delete table with truncate table
> - Do a bulk insert
> - Re-create the indexes
> - Re-create the foreign keys
> Thanks for any input.|||On Thu, 10 May 2007 09:10:01 -0700, DXC
<DXC@.discussions.microsoft.com> wrote:
>How much of a performance gain I can get on 1.2 million rows insert via DTS
>package If I,
>- Drop 1 clustered and 2 non-clustered index on the table I am loading
>- 2-3 foreign keys referencing other tables
>- Replace the delete table with truncate table
>- Do a bulk insert
>- Re-create the indexes
>- Re-create the foreign keys
>Thanks for any input.
Besides two good answers already, how long does it take now?
J.

Friday, March 23, 2012

Performance Counters on Service Broker Transmission Queue

Hello,

is there built-in support for monitoring the number of elements in the transmission queue via performance counters?

Thanks,

There's no perfmon counter. Something like count () or sp_spaceused would be required to query the count. The message send perfmon counters probably are a better indication of what's happening at the connection level - depending on what you're trying to measure.|||

No performance counter. See this post for an efficient query to return the number of rows in the hidden table that represents the transmission queue: http://blogs.msdn.com/remusrusanu/archive/2006/11/08/fast-way-to-check-message-count.aspx

HTH,
~ Remus

|||Thank you both

Performance counters disappeared

I have an application written in C++ that querys all
available performance counters via RegQueryValueEx() API
at 10 second interval on some Windows 2000 computers that
have SQL Server 7.0 installed. After the application have
run for some period of time (several days or longer), the
SQL Server related performance counters disappeared. They
are disabeld by the OS. The knowledge base article
Q248993 mentions that the performance library of Windows
2000 disables any performance DLL that returns data in the
incorrect format, causes an unhandled program fault, or
takes too long to return the performance data (this is
usually the cause of a library being disabled). It is
obvious the incorrect format does not apply to my case
since it would have caused the problem right after it
started not several days later. Anyone knows what causes
the problem?Did you see Q812915?
"Tianxiang Zhang" <tianxiang_zhang@.bmc.com> wrote in message
news:013701c344b5$7f9caed0$a501280a@.phx.gbl...
> I have an application written in C++ that querys all
> available performance counters via RegQueryValueEx() API
> at 10 second interval on some Windows 2000 computers that
> have SQL Server 7.0 installed. After the application have
> run for some period of time (several days or longer), the
> SQL Server related performance counters disappeared. They
> are disabeld by the OS. The knowledge base article
> Q248993 mentions that the performance library of Windows
> 2000 disables any performance DLL that returns data in the
> incorrect format, causes an unhandled program fault, or
> takes too long to return the performance data (this is
> usually the cause of a library being disabled). It is
> obvious the incorrect format does not apply to my case
> since it would have caused the problem right after it
> started not several days later. Anyone knows what causes
> the problem?|||I did. They don't seem to be the same issue. Thanks for
the help.
>--Original Message--
>Did you see Q812915?
>
>"Tianxiang Zhang" <tianxiang_zhang@.bmc.com> wrote in
message
>news:013701c344b5$7f9caed0$a501280a@.phx.gbl...
>> I have an application written in C++ that querys all
>> available performance counters via RegQueryValueEx() API
>> at 10 second interval on some Windows 2000 computers
that
>> have SQL Server 7.0 installed. After the application
have
>> run for some period of time (several days or longer),
the
>> SQL Server related performance counters disappeared.
They
>> are disabeld by the OS. The knowledge base article
>> Q248993 mentions that the performance library of Windows
>> 2000 disables any performance DLL that returns data in
the
>> incorrect format, causes an unhandled program fault, or
>> takes too long to return the performance data (this is
>> usually the cause of a library being disabled). It is
>> obvious the incorrect format does not apply to my case
>> since it would have caused the problem right after it
>> started not several days later. Anyone knows what
causes
>> the problem?
>
>.
>sql