Re: [HACKERS] Speedups - Mailing list pgsql-hackers

From Peter T Mount
Subject Re: [HACKERS] Speedups
Date
Msg-id Pine.LNX.3.95.980305184901.2497A-100000@maidast
Whole thread Raw
In response to Re: [HACKERS] Speedups  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List pgsql-hackers
On Thu, 5 Mar 1998, Vadim B. Mikheev wrote:

> ocie@paracel.com wrote:
> >
> > > > Not sure ofhand, but it would be useful for JDBC's PreparedStatement and
> > > > CallableStatement classes
> > >
> > > We can implement it very easy, and fast. Execution plan may be reused
> > > many times. Is this feature in standard ?
> > > What is proposed syntax if not ?
> >
> > I do see a couple sticky points:
> >
> > We would need some information about which variables are to be
> > substituted into this query plan, but this should be fairly
> > straightforward.
>
> Parser, Planner/Optimizer and Executor are able to handle parameters!
> No problems with this.
>
> > Some querys may not respond well to this, for example, if a table had
> > an index on an integer field f1, this would probably be the best way
> > to satisfy a select where f1<10.  But if this were in a query as f1<x,
> > then a sufficiently high value of x might make this not such a good
> > way to run the query.  I haven't looked into this, but I would assume
> > that the optimizer relies on the specific values in such cases.
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Unfortunately, no!
> We have to add this feature of 'course.
> I don't know how we could deal with pre-compiled plans after this :(
> May be, we could prepare/store not single plan, but some number of
> possible plans.

For inserts & updates I would have thought that the plan would be almost
identical (correct me here if I'm wrong here), and this is an area where
Java really crawls at the moment. Try some 40k inserts in JDBC... and go
out for the night. If we can improve things, it would be a big bonus.

--
Peter T Mount  petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: PyGreSQL 2.1 released
Next
From: Peter T Mount
Date:
Subject: Re: [QUESTIONS] Re: [HACKERS] text should be a blob field