dbTalk Databases Forums  

Inserting small tables across WAN to SQL Server (SLOW??)

comp.databases.ms-access comp.databases.ms-access


Discuss Inserting small tables across WAN to SQL Server (SLOW??) in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
imb
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 12-13-2010 , 04:18 PM






On Dec 13, 4:01*am, Ryan <Mindflu... (AT) gNOSPAMPLEASEmail (DOT) com> wrote:
Quote:
On 12/11/10 3:28 PM, Tony Toews wrote:

On Sat, 11 Dec 2010 09:46:48 -0600, Ryan
Mindflu... (AT) gNOSPAMPLEASEmail (DOT) com> *wrote:

I had no idea Server 08 could handle multiple values in the insert.
That's great (and maybe that'll be my ticket out of slowness).

I'm thinking that sending 900 rows at once might be a bit much for the
WAN connection to keep all correct. *I'd suggest teting by inserting
10 records at a time and then 100 records.

Tony

Tony,
* *Could you provide some code suggestions here? *How could I easily
loop through 10/100 records. *Problems I see with that (100 rec
especially) is getting down to where there is less than 100/less than 10
records and the loop not completing.

do until rst.eof
n=1

* * * * do until n=100

* * * * insert statement here
* * * * *n=n+1
* * * * loop
rst.MoveNext
loop

for example.. would eventually get to <99 records left. I guess I could
use something to tell me my current record position and total record
size to help determine that last bit...
Hi Ryan,

Would this help?

n = 0
Do While (Not rst.EOF)
n = n + 1

insert statements here

if (n = 100) then Exit Do
rst.MoveNext
Loop


Imb.

Reply With Quote
  #22  
Old   
Ryan
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 12-14-2010 , 12:18 PM






imb wrote:
Quote:
On Dec 13, 4:01 am, Ryan <Mindflu... (AT) gNOSPAMPLEASEmail (DOT) com> wrote:
On 12/11/10 3:28 PM, Tony Toews wrote:

On Sat, 11 Dec 2010 09:46:48 -0600, Ryan
Mindflu... (AT) gNOSPAMPLEASEmail (DOT) com> wrote:
I had no idea Server 08 could handle multiple values in the insert.
That's great (and maybe that'll be my ticket out of slowness).
I'm thinking that sending 900 rows at once might be a bit much for the
WAN connection to keep all correct. I'd suggest teting by inserting
10 records at a time and then 100 records.
Tony
Tony,
Could you provide some code suggestions here? How could I easily
loop through 10/100 records. Problems I see with that (100 rec
especially) is getting down to where there is less than 100/less than 10
records and the loop not completing.

do until rst.eof
n=1

do until n=100

insert statement here
n=n+1
loop
rst.MoveNext
loop

for example.. would eventually get to <99 records left. I guess I could
use something to tell me my current record position and total record
size to help determine that last bit...

Hi Ryan,

Would this help?

n = 0
Do While (Not rst.EOF)
n = n + 1

insert statements here

if (n = 100) then Exit Do
rst.MoveNext
Loop


Imb.
That does help, though I need to loop through more than 100. If I have
940, the problem is looping to 100 when I get to record 900, there's
only 40 left will never loop all the way through.

I guess I could get a total record count and have a separate counter
that counts total=total+1 and then on total = rst.recordcount exit do.

Reply With Quote
  #23  
Old   
Marshall Barton
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 12-14-2010 , 02:30 PM



Ryan wrote:
Quote:
Could you provide some code suggestions here? How could I easily
loop through 10/100 records. Problems I see with that (100 rec
especially) is getting down to where there is less than 100/less than 10
records and the loop not completing.

do until rst.eof
n=1

do until n=100

insert statement here
n=n+1
loop
rst.MoveNext
loop

Do Until n=100 Or rst.EOF
insert statement here
n=n+1
loop
If Not rst.EOF Then rst.MoveNext
loop

--
Marsh

Reply With Quote
  #24  
Old   
a a r o n . k e m p f @gmail.com [MCITP: DBA]
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 01-03-2011 , 06:07 AM



wow you're a retard if you're using linked tables across a WAN.

Move to Access Data Projects.. and use WITH (NOLOCK) whenever you create views.. and your life should be a lot easier.

Reply With Quote
  #25  
Old   
Ryan
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 01-03-2011 , 06:24 PM



On 1/3/11 6:07 AM, a a r o n . k e m p f @gmail.com [MCITP: DBA] wrote:
Quote:
wow you're a retard if you're using linked tables across a WAN.

Move to Access Data Projects.. and use WITH (NOLOCK) whenever you create views.. and your life should be a lot easier.

Thanks for the reply? I'll remember to block you from further comments.
Flaming is totally unnecessary but apparently 'your style'.

Reply With Quote
  #26  
Old   
a a r o n . k e m p f @gmail.com [MCITP: DBA]
 
Posts: n/a

Default Re: Inserting small tables across WAN to SQL Server (SLOW??) - 01-05-2011 , 12:18 PM



I'm actually correct.

Using linked tables across a WAN is totally unacceptable from a performance standpoint.

Move to Access Data Projects and use the NOLOCK hint extensively.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.