Re: Predicting query runtime - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Predicting query runtime
Date
Msg-id CAHyXU0zAWZEoN1q0Yzbh_9NnOo3Aiwi692p6_==sQ2SvzQ+OjA@mail.gmail.com
Whole thread Raw
In response to Predicting query runtime  (Vinicius Segalin <vinisegalin@gmail.com>)
Responses Re: Predicting query runtime  (Vinicius Segalin <vinisegalin@gmail.com>)
List pgsql-general
On Mon, Sep 12, 2016 at 9:03 AM, Vinicius Segalin <vinisegalin@gmail.com> wrote:
> Hi everyone,
>
> I'm trying to find a way to predict query runtime (I don't need to be
> extremely precise). I've been reading some papers about it, and people are
> using machine learning to do so. For the feature vector, they use what the
> DBMS's query planner provide, such as operators and their cost. The thing is
> that I haven't found any work using PostgreSQL, so I'm struggling to adapt
> it.
> My question is if anyone is aware of a work that uses machine learning and
> PostgreSQL to predict query runtime, or maybe some other method to perform
> this.

Well, postgres estimates the query runtime in the form of an expected
'cost', where the cost is an arbitrary measure based on time
complexity of query plan.   It shouldn't be too difficult to correlate
estimated cost to runtime cost.  A statistical analysis of that
correlation would be incredibly useful work although generating sample
datasets would be a major challenge.

merlin


pgsql-general by date:

Previous
From: Patrick B
Date:
Subject: Re: 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2
Next
From: Lee Hachadoorian
Date:
Subject: Replication Recommendation