Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

postgres odbc slow. need help

postgres odbc slow. need help

postgres odbc slow. need help


   i have a query that returns about 6000 records. when i do EXPLAIN ANALYZE, the time estimated is 1500 ms. When i try to fill a recordset with ADO it tooks more than 35 second !!.

is it problem of odbc?

thanks for your help


RE: postgres odbc slow. need help

Think about the network bandwidth. If you are using ODBC to access a PostgreSQL server on another machine, then your biggest bottleneck is the network. 6000 records is a lot to bring over through ODBC, and ODBC is not the fastest protocol anyway. What speed is your network?

I see this kind of question a lot, and it really makes me wonder about the reason: why do you need 6000 records all at once, for a client-side app? No matter what client-side GUI you use, the end user can only see one screen at a time. So I can see no reason to have more than approximately 50 - 200 records at a time, for the most part. It sounds like you are trying to do in your client-side application what should be done on the server: recordset manipulation. The whole point of SQL is to keep the logic in the server, where it belongs, and only use the client side for display.

Also, you might want to spend some time reading about PostgreSQL cursors with stored procedures (http://www.postgresql.org/idocs/index.php?plpgsql-cursors.html), which allow you to keep query results on the server, fetching them incrementally.


Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close