Re: A query planner that learns

From: "Guy Rouillier" <guyr(at)masergy(dot)com>
To: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: A query planner that learns
Date: 2006-10-15 04:17:12
Message-ID: D4D1632DC736E74AB95FE78CD609007923B16E@mtxexch01.add0.masergy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim C. Nasby wrote:

> Just recording the query plan and actual vs estimated rowcounts would
> be a good start, though. And useful to DBA's, provided you had some
> means to query against it.

If the DBMS stores the incoming query (or some parsed version of it) and
identifies frequency of usage over time, it can then spend spare cycles
more deeply analyzing frequently used queries. Many DB servers have
usage patterns just like end-user workstations (not all, I realize):
they are busy for predictable periods of the day and fairly idle at
other times. To provide acceptable response times, DBMSs don't have the
luxury of analyzing numerous query paths when queries are received. But
they could do this offline so that the next time it sees the same query,
it can use a better-optimized plan.

Storing the query itself is probably a better idea than storing the
plan, since the plan may change over time.

--
Guy Rouillier

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arthur Molina 2006-10-15 04:42:06 a math function with error handling
Previous Message Ron Johnson 2006-10-15 00:43:43 Re: Postgresql 6.13