Like I said I am not terribly network savvy but what I meant was that the 
particular vpn client that I am using says that my "connection speed" is 
~540Mpbs. 
I know comparing sql alchemy to raw sql is kind of a no-no but I was just 
illustrating that the there isn't obvious evidence of a slow network 
connection.
Wireshark looks very promising - I appreciate the recommendation. 

For the record - I am a huge sqa fan and have been using it for years on 
various projects (in past all on MySQL. I'm not trying to poke holes in the 
performance at all.
I'm just hoping to gain some troubleshooting skills and get it working for 
this new project.

Thanks 

On Wednesday, March 9, 2016 at 11:57:53 AM UTC-8, Mike Bayer wrote:
>
>
>
> On 03/09/2016 11:56 AM, jbrow...@clearcosthealth.com <javascript:> wrote: 
> > This is all extremely helpful. 
> > 
> > After some hair pulling I was able to get the local sql server express 
> > running and I ran the same test on a local instance. 
> > 
> >       1010    0.126    0.000    0.126    0.000 {method 'execute' of 
> > 'pyodbc.Cursor' objects} 
> >       1010    0.060    0.000    0.060    0.000 {method 'close' of 
> > 'pyodbc.Cursor' objects} 
> > 
> > Results seem to be as you expected and I am assuming this means the 
> > bottle neck is running the connection over the vpn. 
> > I am not terribly network/sys admin savvy but I am going to do the best 
> > to troubleshoot the network connection the best I can. I'm a little 
> > concerned about what I will find though because I can run the same 
> > inserts in sql server management studio without any network slowness. 
> > For instance I can run the following over the network through ssms in 1 
> > second: 
> > | 
> > DECLARE @xINT =0 
> > WHILE @x<1000 
> > BEGIN 
> >   SET @x+=1 
> >   INSERT INTO dbo.customer(name)VALUES ('NAME '+CAST(@xAS VARCHAR(100))) 
> > END 
> > | 
>
> ok, but let's look at what we have here.  This is *one* SQL statement, 
> about 200 characters plus a little bit of conversational back and forth 
> to make it happen, emitted over the network.   That your database can 
> insert 1000 rows quickly is not part of the problem here.  It's that 
> sending 1000 individual INSERT statements over the network, each with 
> that same conversational back/forth for every statement, is too slow. 
> Even here, if management studio shows you the time to complete the 
> statement in microseconds you might see it taking .09 seconds rather 
> than .002; not noticeable to humans but a big deal when you multiply. 
>
>
>
> > 
> > I know that ORM's in general aren't supposed to be as fast as straight 
> > sql but does ssms performance contradict the network slowness? 
> > Also the vpn connection itself is reporting a fast connection. 
> > 
> > So best steps for debugging the slow connection? 
> > -I'm trying to be able to run this in the vpn network itself but for the 
> > moment that is not possible for reasons outside my control 
> > -Talk to the hosting company? 
> > -Look up SQL Server connection settings 
> > -Test connection settings? 
> > -ping the server? 
>
> im not sure what "the vpn reports a fast connection" means, but here you 
> want to use ping as a first line of inspection for the network speed. 
>
>  From there, a pretty standard tool is Wireshark 
> https://www.wireshark.org/ which can show you everything about packets 
> on the network, it's a big professional (but still free and open) tool 
> and they have windows versions.   there's a lot of tutorials on the web 
> on how to use it. 
>
>
>
>
> > 
> > Thanks again for walking me through the profile. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "sqlalchemy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to sqlalchemy+...@googlegroups.com <javascript:> 
> > <mailto:sqlalchemy+unsubscr...@googlegroups.com <javascript:>>. 
> > To post to this group, send email to sqlal...@googlegroups.com 
> <javascript:> 
> > <mailto:sqlal...@googlegroups.com <javascript:>>. 
> > Visit this group at https://groups.google.com/group/sqlalchemy. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to