Very slow ODBC connections?
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET
Hi, I'm designing a few applications where I connect to our Informix 7.23 database server using the Newera Informix7 ODBC driver. So the way I do it of course is to just snap in a TDatabase object in C++Builder 3 and set the AliasName to the ODBC datasource name. My problem is that it takes roughly 20 to 25 seconds to connect to the database. This is the same using all kinds of applications, specifically Borland C++Builder, Database Explorer and my own applications. Opening the database with Excel takes similar amounts of time, or somewhat shorter, but still a very long time. Ilogin Demo also takes 15+ seconds. Does anyone have any idea what's going on? Does the BDE or the ODBC slow things down considerably compared to Informix native connections? One thing I'm also curious about: When I use a prepared sql INSERT INTO statement I get a throughput of 30 inserts per second. I'm used to seeing Paradox import 1000's of rows every second... Am I just wrong or what's happening? Our Informix server is a big fat Pentium thing with 256 MB of memory and it just screams, and with hardly any utilization noticeable, apart from when you do imports and exports, when utilization soars to 100%. Hoping for help, Mats Gefvert JAK Membership Bank, Sweden
>My problem is that it takes roughly 20 to 25 seconds to connect to the >database. This is the same using all kinds of applications, specifically >Borland C++Builder, Database Explorer and my own applications. Opening the >database with Excel takes similar amounts of time, or somewhat shorter, but >still a very long time. Ilogin Demo also takes 15+ seconds. >Does anyone have any idea what's going on? Does the BDE or the ODBC slow >things down considerably compared to Informix native connections? Nowhere in your description have you said what options you selected when you configured the ODBC data source -- in other words you are probably seeing default performance. You also haven't mentioned whether you are using ODBC connection pooling, or doing your own connection caching. > I get a throughput of 30 inserts per second. I'm used to seeing Paradox import 1000's of rows every second... The behaviors are different. For one thing, Paradox isn't writing to log files (transaction journaling) when it adds modifies, and deletes rows (unless that's a new feature of Paradox). ========================================================== Database Magic with Ken North (the first book to explain Java in the database) http://ourworld.compuserve.com/homepages/Ken_North/dbmagic.htm
> Nowhere in your description have you said what options you selected > when you configured the ODBC data source -- in other words you are > probably seeing default performance. Um, yeah. For all it's worth, I'm using the olsoctcp protocol, cursor behavior = close, scrollable cursors = disabled, get db list = yes, no translation. > You also haven't mentioned whether you are using ODBC connection > pooling, or doing your own connection caching. No connection pooling. Would be beneficial I suppose? Apart from that there's not a whole lot more options I know of? Mats Gefvert <mats.gefvert@jak.se> JAK Membership Bank, Sweden