Oracle PL/SQL: How Pipelined Table Functions Outperform Regular Ones
Oracle PL/SQL offers two types of table functions — regular and pipelined — both capable of returning collections queryable directly in SQL FROM clauses. Regular table functions load the entire result set into PGA memory before returning data, leading to higher memory usage and slower time-to-first-row, making them suitable mainly for small datasets. Pipelined functions, by contrast, stream rows incrementally to the caller using the PIPE ROW construct, significantly reducing memory overhead and improving responsiveness for large ETL or real-time data operations. A key syntax rule requires that the RETURN statement in a pipelined function remain empty — passing a variable causes a PLS-00633 compilation error. Additionally, the TABLE() wrapper mandatory in Oracle 11g and earlier became optional from Oracle Database 12c Release 2 onward.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in