how to implement selectivity injection in postgresql - Mailing list pgsql-hackers

From Rajmohan C
Subject how to implement selectivity injection in postgresql
Date
Msg-id CAHaqV0gRg3uQgVdF=W9KASSu0bxMtd5Hp1wjzLMsJ8A3DHeRFQ@mail.gmail.com
Whole thread Raw
Responses Re: how to implement selectivity injection in postgresql
Re: how to implement selectivity injection in postgresql
List pgsql-hackers
<div dir="ltr"><pre class=""
style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','LiberationMono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier
New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804800033569336px;background:rgb(238,238,238)">
<pre class=""
style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','LiberationMono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier
New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;background-image:initial;background-repeat:initial">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida
Console','LiberationMono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier
New',monospace,serif;white-space:inherit;background-image:initial;background-repeat:initial"><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">SELECT</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> c1</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">c2</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">c3</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"></span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">FROM</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> T1</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">T2</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">T3       </span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">WHERE</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> T1</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">x</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">=</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">T2</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">x</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">AND</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">       T2</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">y</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">=</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">T3</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">y</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">AND</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">       T1</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">x</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">>=</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"></span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">?</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">selectivity </span><span
class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">0.00001</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">AND</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">       T2</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">y</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">></span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"></span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">?</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">selectivity </span><span
class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">0.5</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">AND</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">       T3</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">z</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">=</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"></span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">?</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">selectivity </span><span
class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">0.2</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,139);background:transparent">AND</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">       T3</span><span
class=""style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">w</span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">=</span><spanclass=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"></span><span class=""
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">?</span></code></pre>
</pre><p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation
Sans','DejaVuSans',sans-serif;line-height:17.804800033569336px;background-image:initial;background-repeat:initial"> I
needto implement Selectivity injection as shown in above query in PostgreSQL by which we can inject selectivity of each
predicateor at least selectivity at relation level directly as part of query. Is there any on-going work on this front?
Ifthere is no ongoing work on this, How should I start implementing this feature?<p style="margin:0px 0px
1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation
Sans','DejaVuSans',sans-serif;line-height:17.804800033569336px;background-image:initial;background-repeat:initial"><br
/></div>

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: failures on barnacle (CLOBBER_CACHE_RECURSIVELY) because of memory leaks
Next
From: Heikki Linnakangas
Date:
Subject: Re: WAL format and API changes (9.5)