Search Postgresql Archives

plpgsql functions and the planner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do SQL statements inside of plpgsql functions get planned upon every execution, only when the function is first executed/defined, or something else entirely? 

For example, suppose I have a table foo and a function bar.  Function bar executes some SQL statements (select/insert/update) against table foo using various indexed columns.  When the function is created and first executed, table foo is near empty so the statements in function bar use seqscans.  Then table foo is filled with many rows.  Now, when bar is executed again, will PG (8.3.1) know that a seqscan is no longer reasonable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux