Dan Wilson writes:
> : SELECT a.x/b.y FROM vals a, (SELECT y FROM vals WHERE y > 0) b WHERE (a.x
> : / b.y) > 1;
>
> How much of a performance hit is there when using a select in the FROM
> clause? Is it even noticeable? How much better is it to create a static
> view?
Subselects in FROM are currently not the most performance-encouraging way
to write a query (explicit JOINs might use more efficient plans), but
setting up a view is going to buy you zero because a query from a view is
just going to end up being processed like a subselect in FROM.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/