By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,922 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,922 IT Pros & Developers. It's quick & easy.

plpythonu+postgrs anybody using it?

P: n/a
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.
Apr 2 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Martin Marcher <ma****@marcher.namewrote:
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-
Apr 2 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.