Re: [PERFORM] [pgsql-hackers-win32] Poor Performance for large queries

2004-09-29 Thread John Meinel
Tom Lane wrote: [ enlarging on Richard's response a bit ] John Meinel <[EMAIL PROTECTED]> writes: jfmeinel=> explain analyze execute myget(3); QUERY PLAN Seq Scan on tdata (co

Re: [PERFORM] [pgsql-hackers-win32] Poor Performance for large queries in functions

2004-09-29 Thread Tom Lane
[ enlarging on Richard's response a bit ] John Meinel <[EMAIL PROTECTED]> writes: > jfmeinel=> explain analyze execute myget(3); > QUERY PLAN > > Seq Scan on tdata (cost=0.

Re: [PERFORM] [pgsql-hackers-win32] Poor Performance for large queries

2004-09-29 Thread John Meinel
Richard Huxton wrote: John Meinel wrote: So notice that when doing the actual select it is able to do the index query. But for some reason with a prepared statement, it is not able to do it. Any ideas? In the index-using example, PG knows the value you are comparing to. So, it can make a bette

Re: [PERFORM] [pgsql-hackers-win32] Poor Performance for large queries

2004-09-29 Thread Richard Huxton
John Meinel wrote: So notice that when doing the actual select it is able to do the index query. But for some reason with a prepared statement, it is not able to do it. Any ideas? In the index-using example, PG knows the value you are comparing to. So, it can make a better estimate of how many

Re: [PERFORM] [pgsql-hackers-win32] Poor Performance for large queries in functions

2004-09-29 Thread John Meinel
Tom Lane wrote: John Meinel <[EMAIL PROTECTED]> writes: ... However, if I try to bundle this query up into a server side function, it runs very slow (10 seconds). I'm trying to figure out why, but since I can't run EXPLAIN ANALYZE inside a function, I don't really know what else to do. A parame