Jeff Janes writes:
> On Wed, Aug 13, 2014 at 9:33 AM, Rajmohan C wrote:
>> I need to implement Selectivity injection as shown in above query in
>> PostgreSQL by which we can inject selectivity of each predicate or at least
>> selectivity at relation level directly as part of query.
> My plan was
On Wed, Aug 13, 2014 at 9:33 AM, Rajmohan C wrote:
> SELECT c1, c2, c3, FROM T1, T2, T3
> WHERE T1.x = T2.x AND
> T2.y=T3.y AND
> T1.x >= ? selectivity 0.1 AND
> T2.y > ? selectivity 0.5 AND
> T3.z = ? selectivity 0.2 AND
> T3.w = ?
>
> I need
On 13-08-2014 15:28, Rajmohan C wrote:
> Yeah. I have to do it for my academic research. Is it available in
> catalogs? It is to be computed at run time from the predicates in the query
> right?
>
The selectivity information is available at runtime. See
backend/optimizer/path/costsize.c.
--
On 13-08-2014 13:33, Rajmohan C wrote:
> SELECT c1, c2, c3, FROM T1, T2, T3
> WHERE T1.x = T2.x AND
> T2.y=T3.y AND
> T1.x >= ? selectivity 0.1 AND
> T2.y > ? selectivity 0.5 AND
> T3.z = ? selectivity 0.2 AND
> T3.w = ?
>
> I need to implement S