Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > PostgreSQL > Problem Postgres + visual Basic

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-07, 13:30
pliff pliff is offline
Registered User
 
Join Date: Nov 2007
Posts: 2
Problem Postgres + visual Basic

I got a proyecto in visual basic with postgres connected throw ODBC and ADO, now the database is nearly 15000 registers and the program it's getting to slow it's take like 4 seconds to execute a query, and from the pgadmin less than 0.5 seconds the same query, what can i do for that?

I'll apreciated your answers.
Reply With Quote
  #2 (permalink)  
Old 11-26-07, 13:29
amthomas amthomas is offline
Registered User
 
Join Date: May 2005
Location: San Antonio, Texas
Posts: 134
hmm, there isn't much information here, but it sounds like the DB isn't the problem. I would look at the code and try to see where it is going slow and see if that is the problem.

If it is an issue with the ODBC/ADO stuff then I dunno sorry.

If it was the db causing issues then you could look at building indexes depending on what you are trying to do. But with only 15000 records (I am assuming that is what you meant) then I don't think that is your problem.

good luck!
__________________
Vi veri veniversum vivus vici
By the power of truth, I, a living man, have conquered the universe
Reply With Quote
  #3 (permalink)  
Old 11-27-07, 01:10
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,359
I would suggest that you post the code you're using to connect to the database, as well as to declare, instanciate, and open the recordset.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
  #4 (permalink)  
Old 11-27-07, 09:37
pliff pliff is offline
Registered User
 
Join Date: Nov 2007
Posts: 2
This is the coneection string i use to connect, i have it in a function and i want call it for every adodc component.

ado.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=postgres;Data Source=super"
Reply With Quote
  #5 (permalink)  
Old 11-28-07, 16:20
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,359
Don't use ADODC. ADODC is bound to a very old version of ADO (v2.1, I believe - the latest version is 2.8...) ADODC adds another layer between the user and the database, and is less efficient than ADO. Also, ADODC opens a separate connection for every control by default.

Ref this ADO Tutorial at our VB sister site.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On