Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Wednesday, March 28, 2012

Performance SQL Server in remote access

I am having problems with SQL Server performance in remote access.
When I use him through a local net
with an application VB is satisfactory, but when
I try to access through a connection ADSL
of 512KB (speedy) it is slow. Former. to open
a screen is long 5 minutes.
The same application with PostgreSql delays nemos of 15 seconds..
It will be that some exists configuration in SQL Server to optimize a remote
access for certain IPS
I thank allI made some simulations with the cursor on the customer's side,
I increased salary size, but didn't give difference none.
Obs.: the application is already optimized to obtain only
the necessary columns, it always accesses for the key it would excel
or indexes, etc...
The interesting is that for PostgreSQL the time of answer
it is very good in accesses through the internet. Perhaps
be for him to have the native access for IP.
I thank the collaboration
"Tony Rogerson" <tonyrogerson@.sqlserver.eu.com> escreveu na mensagem
news:eVcCdGOYDHA.888@.TK2MSFTNGP10.phx.gbl...
> Make sure you are using a client side cursor - check out my presentation
for
> more information on application cursors and their performance
> comparisons...
> http://www.sqlserverfaq.com?eid=20
> --
> Tony Rogerson
> SQL Server MVP
> http://www.sqlserverfaq.com?mbr=21
> (Create your own groups, Forum, FAQ's and a ton more)
>

Friday, March 23, 2012

Performance problems when using multiple SqlConnection objects?

Hello,

I am planning to use three databases on the local SQL Server. DB1 will be for App1, DB2 for App2, and DB3 will hold tables, that both, App1 and App2 need to access.

Obviously, I need in App1 and App2 at least two SqlConnection and SqlCommand objects, one that access their respective databases, and one that will access DB3.

Will this result in a worse performance? (The using of two SqlConnection objects in one aspx page as example, and switching them)

Should I for better performance get rid of DB3 and add the tables there to DB1 and DB2 ? (Thus multiplying data, but, if the performance will be much better, it will be fine with me)

I would be thankful for any advices.

Hello my friend,

Try and use the same database where possible. By using the same database, and therefore the same connection string, the built-in connection pooling will work and therefore conserve resources for you.

Kind regards

Scotty

|||Thanks|||

ask_Scotty:

Hello my friend,

Try and use the same database where possible. By using the same database, and therefore the same connection string, the built-in connection pooling will work and therefore conserve resources for you.

Kind regards

Scotty

Thanks again, but, the more I am thinking about this and your advice, the more confused I am.

The Databases are all on the same machine and on the same instance. Will pooling stop working, or be inefficent, if I use a second SqlConnection object with anohter connection string in a aspx page? In the source code, I usualy close connections immediately, the two will not be open at the same time.

I am still somewhat unsure what to do.

|||

Hello again my friend,

Connecting to different databases, if necessary, from your web pages should be fine. If you can restrict the number of times you need to connect, this would be better. To understand what I mean, read up on page caching and especially data caching in ASP.NET applications. Basically, data caching involves connecting to the database on the first request for the data and then caching it to service subsequent requests as opposed to connecting to the database each time. Caching methods and strategies form a huge subject but one worth getting into.

Kind regards

Scotty

Friday, March 9, 2012

Performance of stored procedure varies

I have run into an issue that if I use the parameters passed into strored
procedure directly the performance is slower than when i declare local
variable and assign the values passed in the procedure to those local
variable and then use the local variables.
Why is this the case?
RahulRead this:
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx#E6TAE
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Rahul" <reach_aggarwal@.hotmail.com> wrote in message
news:%23RXsRNbuHHA.1168@.TK2MSFTNGP02.phx.gbl...
>I have run into an issue that if I use the parameters passed into strored
>procedure directly the performance is slower than when i declare local
>variable and assign the values passed in the procedure to those local
>variable and then use the local variables.
> Why is this the case?
> Rahul
>