fastest postgresql module

Discussion in 'Python' started by Timothy Smith, Mar 17, 2005.

  1. has anyone got some hard numbers on which pg access module is the
    fastest, i currently use pypgsql, but i can't help but feel it's a
    little slow.
    3 seconds to connect, send one query, get th return data.
    i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and i
    have a ping of 245ms average.
    maybe pypgsql does too much backand forth, i don't know.
     
    Timothy Smith, Mar 17, 2005
    #1
    1. Advertising

  2. Timothy Smith skrev:

    > has anyone got some hard numbers on which pg access module is the
    > fastest, i currently use pypgsql, but i can't help but feel it's a
    > little slow.
    > 3 seconds to connect, send one query, get th return data.
    > i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and
    > i have a ping of 245ms average.
    > maybe pypgsql does too much backand forth, i don't know.


    You might want to try psycopg, it's claimed to be optimized for speed.
    --
    Leif Biberg Kristensen
    just another global village idiot
     
    Leif B. Kristensen, Mar 17, 2005
    #2
    1. Advertising

  3. Leif B. Kristensen wrote:

    >Timothy Smith skrev:
    >
    >
    >
    >>has anyone got some hard numbers on which pg access module is the
    >>fastest, i currently use pypgsql, but i can't help but feel it's a
    >>little slow.
    >>3 seconds to connect, send one query, get th return data.
    >>i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and
    >>i have a ping of 245ms average.
    >>maybe pypgsql does too much backand forth, i don't know.
    >>
    >>

    >
    >You might want to try psycopg, it's claimed to be optimized for speed.
    >
    >

    my only issue with psycopg, is last time i looked they had no win32 port?
     
    Timothy Smith, Mar 17, 2005
    #3
  4. Timothy Smith skrev:

    > my only issue with psycopg, is last time i looked they had no win32
    > port?


    Uh, in that case, maybe you should consider changing platform? 8^)
    --
    Leif Biberg Kristensen
    just another global village idiot
     
    Leif B. Kristensen, Mar 17, 2005
    #4
  5. Leif B. Kristensen wrote:

    >Timothy Smith skrev:
    >
    >
    >
    >>my only issue with psycopg, is last time i looked they had no win32
    >>port?
    >>
    >>

    >
    >Uh, in that case, maybe you should consider changing platform? 8^)
    >
    >

    my app has to be multiplatform, but i would gladly rip windows from the
    drives of every computer with my bare hands.
     
    Timothy Smith, Mar 17, 2005
    #5
  6. On Fri, Mar 18, 2005 at 09:31:45AM +1000, Timothy Smith wrote:
    > Leif B. Kristensen wrote:
    >
    > >Timothy Smith skrev:
    > >>has anyone got some hard numbers on which pg access module is the
    > >>fastest, i currently use pypgsql, but i can't help but feel it's a
    > >>little slow.
    > >>3 seconds to connect, send one query, get th return data.
    > >>i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and
    > >>i have a ping of 245ms average.
    > >>maybe pypgsql does too much backand forth, i don't know.
    > >>
    > >>

    > >
    > >You might want to try psycopg, it's claimed to be optimized for speed.
    > >
    > >

    > my only issue with psycopg, is last time i looked they had no win32 port?


    It has one now.

    But (of course depending on your query), your issue is not dependant on
    the particular PostgreSQL, I think.

    You'll probably also have it with executing a plain vanilla script via
    psql.

    -- Gerhard

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (GNU/Linux)

    iD8DBQFCOhzbdIO4ozGCH14RAvyLAJ9oL1hN4zgQ4D/3FHenvJWqsbCJ7gCgwiVx
    8hxp/lCygeqFJ1Jiwm2IW7Y=
    =Xtq3
    -----END PGP SIGNATURE-----
     
    Gerhard Haering, Mar 18, 2005
    #6
  7. Timothy Smith

    Guest

    With the round-trip time of 245ms, three seconds only allows for
    approximately 12 packet exchanges (roughly 24 total packets). I think
    latency is your problem.

    casevh
     
    , Mar 18, 2005
    #7
  8. Timothy Smith

    Josef Meile Guest

    Josef Meile, Mar 18, 2005
    #8
  9. Timothy Smith

    Frank Miles Guest

    In article <>,
    Timothy Smith <> wrote:
    >Leif B. Kristensen wrote:
    >
    >>Timothy Smith skrev:
    >>
    >>
    >>
    >>>has anyone got some hard numbers on which pg access module is the
    >>>fastest, i currently use pypgsql, but i can't help but feel it's a
    >>>little slow.
    >>>3 seconds to connect, send one query, get th return data.
    >>>i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and
    >>>i have a ping of 245ms average.
    >>>maybe pypgsql does too much backand forth, i don't know.
    >>>
    >>>

    >>
    >>You might want to try psycopg, it's claimed to be optimized for speed.
    >>
    >>

    >my only issue with psycopg, is last time i looked they had no win32 port?


    psycopg is available for win32 (though the development version might not be)
    Try:
    http://www.stickpeople.com/projects/python/psycopg/

    HTH...
    -frank
    --
     
    Frank Miles, Mar 18, 2005
    #9
  10. Timothy Smith wrote:
    > [...] is there anyway i can check
    > is it true psycopg is much faster or is it all hyperboll


    The overhead of psycopg per cursor row is a lot less. So it makes a
    difference if you fetch *a lot* of data.

    Anyway, if you don't have a performance problem, you don't need to care ;-)

    Yes there is a way to try it out, install it and compare :p

    As I said, there is a win32 version of psycopg if that's the only
    platform you have access to:

    Google - first hit:

    http://www.google.de/search?hl=de&q=psycopg win32&btnG=Google-Suche&meta=

    =>

    http://www.stickpeople.com/projects/python/psycopg/

    -- Gerhard
     
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=, Mar 19, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. User At Domain Dot Invalid

    "_pg" (Postgresql) module for win32

    User At Domain Dot Invalid, Aug 20, 2003, in forum: Python
    Replies:
    2
    Views:
    445
    David M. Cook
    Aug 22, 2003
  2. W. Borgert

    Which Python module for PostgreSQL?

    W. Borgert, Mar 2, 2004, in forum: Python
    Replies:
    10
    Views:
    563
    David M. Cook
    Mar 4, 2004
  3. Maric Michaud
    Replies:
    0
    Views:
    7,202
    Maric Michaud
    Jun 24, 2006
  4. krishnakant Mane
    Replies:
    0
    Views:
    244
    krishnakant Mane
    May 19, 2007
  5. eddieia
    Replies:
    13
    Views:
    258
Loading...

Share This Page