X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 70BB0D1B45D for ; Thu, 18 Dec 2003 06:30:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68850-04 for ; Thu, 18 Dec 2003 02:30:26 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id C723FD1B464 for ; Thu, 18 Dec 2003 02:30:25 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id hBI6UOU6067553 for ; Thu, 18 Dec 2003 06:30:25 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id hBI6NvVi052331 for pgsql-admin@postgresql.org; Thu, 18 Dec 2003 06:23:58 GMT From: nzanella@cs.mun.ca (Neil Zanella) X-Newsgroups: comp.databases.postgresql.admin Subject: PostgreSQL: query optimizer: viewing query plans Date: 17 Dec 2003 22:23:57 -0800 Organization: http://groups.google.com Lines: 16 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/271 X-Sequence-Number: 11777 Hello, Several textbooks talk about query trees and query plans including the following relatively recent book which covers how to apply performance tuning techniques by using knowledge about the query optimizer to rewrite SQL queries so that they get interpreted more efficiently. Unfortunately the book only shows how to view the query plan associated witht the given query for Oracle, IBM DB2, and MS SQL Server. I wonder whether PostgreSQL also has a way to let the user see the heuristically computed query plan created by the query optimizer. Is it possible to view query plans with PostgreSQL server and its related command line interfaces? How would I run such a command? Thanks, Neil