The optimizer of PostgreSQL uses cost-based algorithms to determine the best execution plan for a given query. The query tree of a query can be inspected with the EXPLAIN command.

The optimizer of PostgreSQL uses cost-based algorithms to determine the best execution plan for a given query. The query tree of a query can be inspected with the EXPLAIN command.