bug with current sources? Re: cost of parse/plan/execute for one sample query

From: Barry Lind <barry(at)xythos(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: bug with current sources? Re: cost of parse/plan/execute for one sample query
Date: 2002-04-14 05:27:24
Message-ID: 3CB9133C.8060401@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In testing Neil's PREPARE/EXECUTE patch on my test query, I found the
parser complains that this query is not valid when using current
sources. The error I get is:

psql:testorig.sql:1: ERROR: JOIN/ON clause refers to "xf2", which is
not part of JOIN

I think the sql is valid (at least it has worked in 7.1 and 7.2). Is
this a bug?

thanks,
--Barry

PS. I forgot to mention that the below performance numbers were done on
7.2 (not current sources).

Barry Lind wrote:
> In benchmarks that I have done in the past comparing performance of
> Oracle and Postgres in our web application, I found that I got ~140
> requests/sec on Oracle and ~50 requests/sec on postgres.
>
> The code path in my benchmark only issues one sql statement. Since I
> know that Oracle caches query plans, I wanted to see the cost under
> postgres of the parse/plan/execute to see if the parsing and planing of
> the sql statement would account for the difference in performance
> between Oracle and postgres.
>
> In a recent mail note to hackers, Tom mentioned the existence of the
> show_parser_stats, show_planner_stats, and show_executor_stats
> parameters in the postgresql.conf file. So I turned them on ran my
> query a few times and here are the results:
>
> average of 10 runs:
> parsing = .003537 sec (19.3%)*
> planning = .009793 sec (53.5%)
> execute = .004967 sec (27.2%)
>
> If Oracle is only incurring the execute cost for each query then this
> would explain the difference in performance between Oracle and Postgres.
>
> This would lead me to conclude that the current proposed PREPARE/EXECUTE
> patch will be very useful to me. (now I just need to find the time to
> test it).
>
> thanks,
> --Barry
>
> * show_parser_stats prints out three separate timings: parser
> statistics, parse analysis statistics, rewriter statistics, the number
> .003537 is the sum of those three (.001086 + .002350 + .000101)
>
>

Attachment Content-Type Size
testorig.sql text/plain 2.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-04-14 05:52:00 Re: [HACKERS] PostgreSQL 7.2.1-2PGDG RPMs available for
Previous Message Bruce Momjian 2002-04-14 05:20:38 Re: experimental pg_qcache patch