Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Mike Ayuso
  Where is Mike Ayuso?
 Belize City
 Belize
 Mike Ayuso
 Tags
Subject: RE: Pass through SQL
Thread ID: 395357 Message ID: 395416 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Tuesday, January 14, 2014 6:58:23 PM         
   


> >
> >
> > Hi,
> > Whenever I develop a system with a remote backend server using MS SQL Server I
> > always pay close attention to my default start up SQL commands to populate
> > my local cursors.
> >
> > As examples. . .
> > - My normal local cursors in a POS system may only be populated with
> > invoice header and invoice detail record for the past 30 days.
> > - An autoshop program with scheduled tasks may only initially bring
> > in all jobs completed in the past 7 days, all uncompleted jobs and
> > all new jobs in the future.
> >
> > This like the above will greatly reduce the load time in minimizing the
> > initial record load upon application start up. This will also maintain
> > a even start up time as the database tables grow in sizes.
> >
> > You do need maintenance options to be able to look at other records not
> > including in your initial WHERE conditions, but this is easy to do and
> > I always scope the select statements with a main WHERE condition. That
> > is to say selecting aged records I may only allow the user to select
> > records between a staring and ending date range and an option for all
> > records against one customer only, etc.
> >
> > Pete "the IceMan", from the Great White North of Canada.
> > www.marathongriffincomputers.com
>
> Thanks. I will re-visit and see where this is possible in my example. However, I am still concern because the tables are extremely small at the moment since I am just starting with the implementation. Hence, currently it has nothing to do with how many records are fetched with my current WHEREs.


Hi,
I understand, but do re-visit. As your application record sizes grow and grow your current times
will only increase and get worst with poor or non-existent WHERE conditions.

One of the things I may do in a case like yours is to perform some regular Internet speed testing
to verify exactly what is your throughput at various times.

You may wish to consider downloading the Emco Freeware Ping monitor . . .
http://emcosoftware.com/ping-monitor/download

Set it up to ping the external IP port say every 5 minutes do during a 24 hour period you get
a good idea of the ping reply response times.
You want to know :
1. Is this just the case of too much data on too slow a connection?
2. Is there only certain times of the day that things are slow or slow all the time?

I would really take a good hard look at your main cursor creation and if several, break these
out into separate .prg's so you can run each on and actually time the seconds involve with the
loading up of each and every cursor.

You should again be able to identify if things are generally just slow or is their one that is
causing the delay?

Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

ENTIRE THREAD

Pass through SQL Posted by Mike Ayuso @ 1/13/2014 10:11:08 PM
RE: Pass through SQL Posted by anand kulkarni @ 1/14/2014 3:41:10 AM
RE: Pass through SQL Posted by Mike Ayuso @ 1/14/2014 5:53:52 PM
RE: Pass through SQL Posted by David Mustakim @ 1/14/2014 5:14:56 AM
RE: Pass through SQL Posted by Mike Ayuso @ 1/14/2014 5:52:38 PM
RE: Pass through SQL Posted by David Mustakim @ 1/14/2014 6:09:12 PM
RE: Pass through SQL Posted by Mike Ayuso @ 1/14/2014 11:57:33 PM
RE: Pass through SQL Posted by David Mustakim @ 1/15/2014 4:03:20 AM
RE: Pass through SQL Posted by Mike Ayuso @ 1/15/2014 4:37:50 PM
RE: Pass through SQL Posted by David Mustakim @ 1/15/2014 4:50:46 PM
RE: Pass through SQL Posted by Mike Ayuso @ 1/15/2014 5:19:05 PM
RE: Pass through SQL Posted by David Mustakim @ 1/15/2014 5:28:10 PM
RE: Pass through SQL Posted by Mike Ayuso @ 1/15/2014 5:51:41 PM
RE: Pass through SQL Posted by Pete Sass @ 1/14/2014 3:39:02 PM
RE: Pass through SQL Posted by Mike Ayuso @ 1/14/2014 5:57:06 PM
RE: Pass through SQL Posted by Ali Koumaiha @ 1/14/2014 6:35:57 PM
RE: Pass through SQL Posted by Pete Sass @ 1/14/2014 6:58:23 PM
RE: Pass through SQL Posted by Ali Koumaiha @ 1/14/2014 7:07:08 PM
RE: Pass through SQL Posted by Tom Saddul @ 1/15/2014 4:43:47 AM
RE: Pass through SQL Posted by Mike Ayuso @ 1/15/2014 4:46:26 PM