Re: [PERFORM] function performance vs in-line sql

2007-03-08 Thread Schwarz, Karl
mance@postgresql.org Subject: Re: [PERFORM] function performance vs in-line sql Schwarz, Karl wrote: > Is there something basic I am missing here with the use of a function. > I am no database expert, but my assumption was that a function would > give me better results than in-line sql. N

Re: [PERFORM] function performance vs in-line sql

2007-03-08 Thread Heikki Linnakangas
Schwarz, Karl wrote: I am having a performance problem with a query implemented within a server side function. If I use an SQL client(EMS Postgres) and manually generate the sql query I get about 100 times performance improvement over using the function. I've also tried using a prepared statemen

Re: [PERFORM] function performance vs in-line sql

2007-03-08 Thread Richard Huxton
Schwarz, Karl wrote: Is there something basic I am missing here with the use of a function. I am no database expert, but my assumption was that a function would give me better results than in-line sql. Not necessarily. Usually it means the planner has less information to go on. We'll need more