Re: A query planner that learns - Mailing list pgsql-general

From Guy Rouillier
Subject Re: A query planner that learns
Date
Msg-id D4D1632DC736E74AB95FE78CD609007923B16E@mtxexch01.add0.masergy.com
Whole thread Raw
In response to Re: A query planner that learns  ("Jim C. Nasby" <jim@nasby.net>)
List 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


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Postgresql 6.13
Next
From: Arthur Molina
Date:
Subject: a math function with error handling