Re: Using Metadata in Query Optimization

2016-09-27 Thread Γιώργος Θεοδωράκης
Thank you, it worked with the Statistic object. 2016-09-26 19:45 GMT+03:00 jordan.halter...@gmail.com < jordan.halter...@gmail.com>: > I think you should just be able to override getStatistic() in your table > implementations and return a Statistic object that has an accurate row > count. The tab

Re: Using Metadata in Query Optimization

2016-09-26 Thread jordan.halter...@gmail.com
I think you should just be able to override getStatistic() in your table implementations and return a Statistic object that has an accurate row count. The table scan should compute its cost from that, and uses 100d as a default IIRC. > On Sep 25, 2016, at 1:56 PM, Γιώργος Θεοδωράκης > wrote:

Re: Using Metadata in Query Optimization

2016-09-25 Thread Γιώργος Θεοδωράκης
I believe it has to do with the implementation of my tables, as I get fixed numbers: 1)select * from products => Rows:100 2)select * from products where productid > 5 => Rows:50 3)select * from products where productid = 5 => Rows:25 (and the exact same numbers for the table orders) How can I defi

Using Metadata in Query Optimization

2016-09-24 Thread Γιώργος Θεοδωράκης
Hello, I am using a HepPlanner for query optimization on logical operators. When I run the optimizations, I get an optimized plan according to the rules I have used but wrong metadata results. My code is : SqlNode sqlNode = planner.parse(query); SqlNode validatedSqlNode = planner.validate(sqlNode