Re: [GENERAL] simple functions, huge overhead, no cache

2010-07-10 Thread Craig Ringer
On 09/07/10 22:26, Josip Rodin wrote: > db=# explain analyze select issuperuser(id) from users; > QUERY PLAN > > Seq Scan on users (cost=0

Re: [GENERAL] weird empty return from select problem; periodically get no data returned - could it be a network issue?

2010-07-10 Thread Daniel Verite
Susan Cassidy wrote: > Any explanations or ideas? The processing works, because other iterations > of the program are constantly running, so the next attempt returns data, and > runs as normal. However, it bugs me that sometimes a query that should work > is returning no results, for no

Re: [GENERAL] simple functions, huge overhead, no cache

2010-07-10 Thread Scott Ribe
This may need to be made more obvious in the documentation... Having both SQL and PL/PgSQL languages is one of those things that is different enough from other database systems that many people will not expect and may not notice it unless it is pointed out explicitly and prominently. On Jul 10,

Re: [GENERAL] simple functions, huge overhead, no cache

2010-07-10 Thread Tom Lane
Craig Ringer writes: > Your problem boils down to the fact that PL/PgSQL function calls are > expensive. PL/PgSQL is good for complex work, but bad for wrapping up > simple expressions because setting up / tearing down the function call > context is so expensive. Yes. What's actually the most ex

Re: [GENERAL] simple functions, huge overhead, no cache

2010-07-10 Thread Pavel Stehule
Hello 2010/7/10 Tom Lane : > Craig Ringer writes: >> Your problem boils down to the fact that PL/PgSQL function calls are >> expensive. PL/PgSQL is good for complex work, but bad for wrapping up >> simple expressions because setting up / tearing down the function call >> context is so expensive.