Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    2

    Unanswered: 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.

  2. #2
    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

  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    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


  4. #4
    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"

  5. #5
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •