plpythonu+postgrs anybody using it?

Discussion in 'Python' started by Martin Marcher, Apr 2, 2008.

  1. Hello,

    I just started on working with a postgres project, the DB looks really
    bad and isn't normalized in any way... 4k Text messages representing a
    whole protocol which need to be transformed. Somehow it just doesn't
    seem right to put this stuff directly in the database and creating a
    bunch of stored procedures (SP) to parse them but I'm not the one to
    decide it...

    My main concern is that when things start getting more complicated
    that everytime a SP is called an instance of the interpreter ist
    started which would be a huge slowdown, so does plpythonu run
    continiously a python process or does it start one everytime a SP is
    called?

    --
    http://tumblr.marcher.name
    https://twitter.com/MartinMarcher
    http://www.xing.com/profile/Martin_Marcher
    http://www.linkedin.com/in/martinmarcher

    You are not free to read this message,
    by doing so, you have violated my licence
    and are required to urinate publicly. Thank you.
     
    Martin Marcher, Apr 2, 2008
    #1
    1. Advertising

  2. Martin Marcher <> wrote:
    > My main concern is that when things start getting more complicated
    > that everytime a SP is called an instance of the interpreter ist
    > started which would be a huge slowdown, so does plpythonu run
    > continiously a python process or does it start one everytime a SP is
    > called?


    I'm not using plpythonu, but nobody else seems to be jumping to answer
    so I'll have a go. I'm fairly sure but not certain that what I say
    below is true.

    When you use PL/Python, there is no separate Python process. The Python
    interpreter is dynamically linked into each PostgreSQL back-end process
    when it first calls a PL/Python function. That means that whatever the
    overhead is for initialising the Python interpreter, it will be paid at
    most once per database connection.

    If you find that this overhead is too high, a connection pooling system
    like pgpool might help.

    -M-
     
    Matthew Woodcraft, Apr 2, 2008
    #2
    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. (Pete Cresswell)
    Replies:
    3
    Views:
    478
    (Pete Cresswell)
    Oct 20, 2004
  2. =?ISO-8859-1?Q?Gustavo_C=F3rdova_Avila?=

    Anybody using Arch?

    =?ISO-8859-1?Q?Gustavo_C=F3rdova_Avila?=, Nov 29, 2004, in forum: Python
    Replies:
    0
    Views:
    287
    =?ISO-8859-1?Q?Gustavo_C=F3rdova_Avila?=
    Nov 29, 2004
  3. Replies:
    9
    Views:
    441
    Pieter Swart
    Nov 5, 2005
  4. Replies:
    2
    Views:
    343
    Dale Strickland-Clark
    Jan 8, 2006
  5. Gerardo Herzig

    plpythonu and "hello concurrent world"

    Gerardo Herzig, Dec 5, 2007, in forum: Python
    Replies:
    0
    Views:
    285
    Gerardo Herzig
    Dec 5, 2007
Loading...

Share This Page