SQL Query across a network


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: SQL Query across a network

  1. #1
    Andy Jackson Guest

    SQL Query across a network


    I've written a small vb (v6.0) app to perform a sql query on a foxpro free-table
    and then display the results.
    However the foxpro tables are kept on a remote machine (The DSN I use points
    to a mapped drive), and due to the size of the database table (20+ meg),
    it returns a hefty chunk of this (15 meg+) depending on the exact query.
    However the actual data that I'm actually querying (2 fields from a small
    number of records) amounts to maybe 5k at most.
    Of course due to the amount of data that is being moved across the network,
    thi s slows the entire process down considerably (the same programpointing
    at the same table on the local machine is some 20x faster).
    Is there an easy way to overcome this (ideally get the remote machine to
    perform the query, and only return results) ?
    The remote machine is not running sql server or any such like, it is just
    a file server.

    Regards,
    Andy

  2. #2
    Michael Culley Guest

    Re: SQL Query across a network

    Is your query returning the minimum amout of data possible? You should
    ensure that you are returning on the fields you need and only the rows you
    need. If you are already doing this (as I presume you are) then you could
    try indexing all the fields in the where clause of your query, this should
    reduce the number of records the query needs to read to get the data.

    --
    Michael Culley
    www.vbdotcom.com


    "Andy Jackson" <andrew@planitbs.co.uk> wrote in message
    news:3ccaf3dc$1@10.1.10.29...
    >
    > I've written a small vb (v6.0) app to perform a sql query on a foxpro

    free-table
    > and then display the results.
    > However the foxpro tables are kept on a remote machine (The DSN I use

    points
    > to a mapped drive), and due to the size of the database table (20+ meg),
    > it returns a hefty chunk of this (15 meg+) depending on the exact query.
    > However the actual data that I'm actually querying (2 fields from a small
    > number of records) amounts to maybe 5k at most.
    > Of course due to the amount of data that is being moved across the

    network,
    > thi s slows the entire process down considerably (the same programpointing
    > at the same table on the local machine is some 20x faster).
    > Is there an easy way to overcome this (ideally get the remote machine to
    > perform the query, and only return results) ?
    > The remote machine is not running sql server or any such like, it is just
    > a file server.
    >
    > Regards,
    > Andy




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center