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

Tuesday, March 27, 2012

External stored procedure, performance?

Hi everybody,
I should begin to write a DLL library for Sql2000 server.
The functions I like to implement are mathematical functions, like standard
deviation, and similar, nothing really complex. Often I have to use more
then one standard deviation inside the sama function, using subset of a
record set.
Of course I can use sql2000, that implemets standard deviation and basic
mathematical function, so the question is: is it opportune to write a DDL to
improve performance, or is it worse, or just the same?
thanks a lot for any kindly advice
cesareI think the key words here are "using a subset of a recordset". Based on
that I would implement it in T-SQL, or on the application side but not in an
XP. The cost of connecting back to the SQL Server to grab a subset of rows
is going to be big, especially if you perform this std dev calc several
times in a row.
"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:uO9XdpvjGHA.1640@.TK2MSFTNGP02.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
> thanks a lot for any kindly advice
> cesare
>sql

Wednesday, March 21, 2012

ExtendedProperties Performance

Has anyone found a way to speed up the retrival of the "ExtendedProperties" on a column via SMO yet?

I had a search around but couldn't spot anything. I have an applicaiton that currently cyles through 180+ tables (with the number growing all the time) and the "ExtendedProperties" access is abosultly killing it ... taking it from seconds to minutes.

If anyone could provide any information (even if it's a "no it's not possible to speed up") or an alternative retrival method I'd greatly appreciate it.

Have you tried using the SetDefaultInitFields method to include the ExtendedProperties object? Insert this code after you connect to the server:

srv.SetDefaultInitFields(GetType(Table), "ExtendedProperties")

|||

I'm retriving the ExtendedProperties from Columns, not Tables :)

I've tried including the SetDefualtInitFields(typeof(Column), "ExtendedProperties") but it doesn't have much effect.

The people in this thread are having the same problem: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=571167&SiteID=1

|||

ExtendedProperties is a collection not a property therefore your solution will not work.

Try this:

Database db = ... // get your database root

ScriptingOptions so = new ScriptingOptions();

db.PrefetchObject(typeof(Table), so);

so.ExtendedProperties = true;

db.PrefetchObjects(typeof(Column), so);

Let me know if it works.

Ciprian Gerea, SqlServer SDE

|||

This,

"this.o_Database.PrefetchObjects(typeof(Column), scriptingOptions);"

doesn't work, I think this is because it is a child collection on Table rather than on Database.

But,

ScriptingOptions scriptingOptions = new ScriptingOptions();

scriptingOptions.ExtendedProperties = true;

this.o_Database.PrefetchObjects(typeof(Table), scriptingOptions);

works wonderfully :D It seems it prefetchs the ExtendedProperties on the Columns as well as the Tables!

Thanks for helping me optimize my 5 minute loop into a 10 second one :D

Extended stored procedure, performance?

"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:et2MIqvjGHA.4304@.TK2MSFTNGP03.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
>
Extended stored procedures are so dangerous to the stability of the database
server that they should be used very, very carefully.
In SQL 2005 CLR integration provides a safe way to extent the SQL engine
with custom calculations.
DavidHi everybody,
I should begin to write a DLL library for Sql2000 server.
The functions I like to implement are mathematical functions, like standard
deviation, and similar, nothing really complex. Often I have to use more
then one standard deviation inside the sama function, using subset of a
record set.
Of course I can use sql2000, that implemets standard deviation and basic
mathematical function, so the question is: is it opportune to write a DDL to
improve performance, or is it worse, or just the same?
thanks a lot for any kindly advice
cesare|||"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:et2MIqvjGHA.4304@.TK2MSFTNGP03.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
>
Extended stored procedures are so dangerous to the stability of the database
server that they should be used very, very carefully.
In SQL 2005 CLR integration provides a safe way to extent the SQL engine
with custom calculations.
David

Extended stored procedure, performance?

Hi everybody,
I should begin to write a DLL library for Sql2000 server.
The functions I like to implement are mathematical functions, like standard
deviation, and similar, nothing really complex. Often I have to use more
then one standard deviation inside the sama function, using subset of a
record set.
Of course I can use sql2000, that implemets standard deviation and basic
mathematical function, so the question is: is it opportune to write a DDL to
improve performance, or is it worse, or just the same?
thanks a lot for any kindly advice
cesare"Cesare" <cvairetti@.mcgestioni.it> wrote in message
news:et2MIqvjGHA.4304@.TK2MSFTNGP03.phx.gbl...
> Hi everybody,
> I should begin to write a DLL library for Sql2000 server.
> The functions I like to implement are mathematical functions, like
> standard
> deviation, and similar, nothing really complex. Often I have to use more
> then one standard deviation inside the sama function, using subset of a
> record set.
> Of course I can use sql2000, that implemets standard deviation and basic
> mathematical function, so the question is: is it opportune to write a DDL
> to
> improve performance, or is it worse, or just the same?
>
Extended stored procedures are so dangerous to the stability of the database
server that they should be used very, very carefully.
In SQL 2005 CLR integration provides a safe way to extent the SQL engine
with custom calculations.
David

Extended stored procedure performance tuning

We have an application that is based on several extended stored
procedures. When we run our application in house, or when most other
customers run it, they see performance of about X transactions per
second. One customer is seeing performance of about X/5, and I'm
having a hard time troubleshooting it. The performace bottleneck has
been narrowed to the execution of the extended stored procedures. Does
anyone know of tuneable SQL Server parameters that may specifically
affect the performance of extended stored procedures. I know the
procedures get run by a scheduler. Is there some way the priority or
frequency of the scheduler can be modified? Thanks for any advice.Are there lots of concurrent users in this one customer? This KB article
might be interesting
to you:

http://support.microsoft.com/?kbid=836839

--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix

<bsandell@.gmail.com> wrote in message
news:1116439417.870512.217270@.g14g2000cwa.googlegr oups.com...
> We have an application that is based on several extended stored
> procedures. When we run our application in house, or when most other
> customers run it, they see performance of about X transactions per
> second. One customer is seeing performance of about X/5, and I'm
> having a hard time troubleshooting it. The performace bottleneck has
> been narrowed to the execution of the extended stored procedures. Does
> anyone know of tuneable SQL Server parameters that may specifically
> affect the performance of extended stored procedures. I know the
> procedures get run by a scheduler. Is there some way the priority or
> frequency of the scheduler can be modified? Thanks for any advice.|||Are you using synchronization objects inside the XP?
Loopback connections?

GertD@.SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.

<bsandell@.gmail.com> wrote in message
news:1116439417.870512.217270@.g14g2000cwa.googlegr oups.com...
> We have an application that is based on several extended stored
> procedures. When we run our application in house, or when most other
> customers run it, they see performance of about X transactions per
> second. One customer is seeing performance of about X/5, and I'm
> having a hard time troubleshooting it. The performace bottleneck has
> been narrowed to the execution of the extended stored procedures. Does
> anyone know of tuneable SQL Server parameters that may specifically
> affect the performance of extended stored procedures. I know the
> procedures get run by a scheduler. Is there some way the priority or
> frequency of the scheduler can be modified? Thanks for any advice.|||Also check if you customer is running fibers or threads? exec sp_configure
'lightweight pooling'
Verify size of the MemToLeave area, maybe your customers runs with /3GB on
or off, of uses the -g startup parameter to set the MemToLeave area size in
SQL Server

GertD@.SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.

"Gert E.R. Drapers" <gertdATsqldevDOTnet> wrote in message
news:428c7663$0$64595$e4fe514c@.news.xs4all.nl...
> Are you using synchronization objects inside the XP?
> Loopback connections?
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use.
> Copyright SQLDev.Net 1991-2005 All rights reserved.
> <bsandell@.gmail.com> wrote in message
> news:1116439417.870512.217270@.g14g2000cwa.googlegr oups.com...
>> We have an application that is based on several extended stored
>> procedures. When we run our application in house, or when most other
>> customers run it, they see performance of about X transactions per
>> second. One customer is seeing performance of about X/5, and I'm
>> having a hard time troubleshooting it. The performace bottleneck has
>> been narrowed to the execution of the extended stored procedures. Does
>> anyone know of tuneable SQL Server parameters that may specifically
>> affect the performance of extended stored procedures. I know the
>> procedures get run by a scheduler. Is there some way the priority or
>> frequency of the scheduler can be modified? Thanks for any advice.
>>sql

Sunday, February 26, 2012

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle

Friday, February 24, 2012

Express and Developer - performance counter errors

I installed Visual Studio 2005 on my machine, which includes SQL Server Express. I then installed the Developer edition of SQL Server over the top, as that's the edition I wanted. I now get four errors in my Application event log whenever I boot Windows:

    MSSQLSERVER - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQLSERVER - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

    MSSQL$SQLEXPRESS - Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.

    MSSQL$SQLEXPRESS - Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled.

Any idea what's causing this problem and how I can fix it?

Thanks

Here is one thing you can try.

Start Regedit

For a default instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer\Performance\Library

For a named instance of SQL Server, locate the following registry value in Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQL$<Instance Name>\Performance\Library

If the registry key does not exist in Registry Editor, you must rebuild the registry. For more information about how to rebuild the registry to fix these registry errors, see the "How to rebuild the registry (Setup)" topic in SQL Server Books Online.

Michelle

|||

Hi there, I've only just noticed your reply so thanks for responding. I have removed the MSSQL$SQLExpress instance via Control Panel but I am still getting the error messages for the MSSQLServer instance.

I have looked at the registry entry you mentioned and it is present and is set to 'sqlctr90.dll'. Is that correct? If so, any further ideas?

Thanks

|||

Yes what you see is correct.

Check out the following thread as it has some other suggestions to try.

Michelle

|||Sorry Michelle but I can't see a link in your reply - could you tell me the thread title?

Thanks

Neil|||

Sorry I forgot to attach the link.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=158314&SiteID=1

Michelle