Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-25 Thread Sergei Golubchik
Hi, Anshu! On Jun 25, Anshu Avinash wrote: > Hi Sergei, > > I have been looking into various methods that can meet our conditions. > The Gauss-Seidel Method (http://en.wikipedia.org/wiki/Gauss-Seidel_method) > might meet our requirements. I had just started writing the code. > > So in a nutshell

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-25 Thread Anshu Avinash
Hi Sergei, I have been looking into various methods that can meet our conditions. The Gauss-Seidel Method ( http://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method) might meet our requirements. I had just started writing the code. So in a nutshell, Gauss-seidel method is an iterative method. In

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-25 Thread Sergei Golubchik
Hi, Anshu! Please, see the attached patch. It introduces a macro top_level_cond_is_satisfied() that now marks all places where a comparison (in the TIME_FOR_COMPARE sense) is done. So, all you need to do is to convert this macro into an (inline) function and increment your counter from there. As

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-18 Thread Sergei Golubchik
Hi, Anshu! Please, don't forget to cc: maria-developers@ when discussing development topics. On Jun 18, Anshu Avinash wrote: > > What I meant to say was we need N "linearly independent" equations to > solve for N variables and that might not be the case. Some of the > queries might not use any f

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-18 Thread Sergei Golubchik
Hi, Anshu! On Jun 18, Anshu Avinash wrote: > Hi serg, > > Sorry that I had been out of touch for 1-2 days. I got caught up in some > other work. > > I have read through the comments you made on MDEV and I have just started > the implementation for the first approach, the approximate method. I ha

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-13 Thread Sergei Golubchik
Hi, Anshu! On Jun 13, Anshu Avinash wrote: > > So I have refactored Cost_factors::init() into Cost_factors::init() and > Cost_factors::re_init(). The diff is at: > https://github.com/igniting/server/commit/41e360309c067d072d788495e4e9480546287721.diff Looks great. I've added one comment there.

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-11 Thread Jocelyn Fournier
Hi, In this case WHERE a > 6 should have a better chance to trigger a full table scan than a > 21. Jocelyn Le 11/06/2014 09:51, Anshu Avinash a écrit : Hi serg, Yes, I had tried that. I had tried many combinations. I have updated the test however on github code: https://github.com/ignitin

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-11 Thread Anshu Avinash
Hi serg, Yes, I had tried that. I had tried many combinations. I have updated the test however on github code: https://github.com/igniting/server/tree/selfTuningOptimizer. Regards Anshu On Wed, Jun 11, 2014 at 1:13 PM, Sergei Golubchik wrote: > Hi, Anshu! > > On Jun 11, Anshu Avinash wrote: >

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-11 Thread Sergei Golubchik
Hi, Anshu! On Jun 11, Anshu Avinash wrote: > Hi serg, > > I have attached the updated diff. I'm still unable to observe the effect > introduced by the cost factors. Maybe I just need to study the usage of > scan_time() and read_time() in greater detail. Ok, see one suggestion below. If that won'

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-10 Thread Anshu Avinash
Hi serg, I have attached the updated diff. I'm still unable to observe the effect introduced by the cost factors. Maybe I just need to study the usage of scan_time() and read_time() in greater detail. Regards Anshu On Tue, Jun 10, 2014 at 1:19 PM, Sergei Golubchik wrote: > Hi, Anshu! > > On J

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-10 Thread Sergei Golubchik
Hi, Anshu! On Jun 10, Anshu Avinash wrote: > Hi serg, > > I have implemented your suggestions. In the test case I created a table > with 25 rows. Explain for 'select * from t1 where a > 19' gave 'ALL' while > explain for 'select * from t1 where a > 20' gives range. > I have also written public me

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-10 Thread Anshu Avinash
Hi serg, I have implemented your suggestions. In the test case I created a table with 25 rows. Explain for 'select * from t1 where a > 19' gave 'ALL' while explain for 'select * from t1 where a > 20' gives range. I have also written public methods ha_scan_time() and ha_read_time(). I should replac

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-09 Thread Sergei Golubchik
Hi, Anshu! On Jun 08, Anshu Avinash wrote: > Hi all, > > As per serg comments on the previous commit, I have modified the code to > add an init function which will initialize all the cost factors at the > start of the server. The latest code is at > https://github.com/igniting/server/commits/self

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-09 Thread Sergei Golubchik
Hi, Anshu! On Jun 08, Anshu Avinash wrote: > Hi all, > > As per serg comments on the previous commit, I have modified the code to > add an init function which will initialize all the cost factors at the > start of the server. The latest code is at > https://github.com/igniting/server/commits/self

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-06-08 Thread Anshu Avinash
Hi all, As per serg comments on the previous commit, I have modified the code to add an init function which will initialize all the cost factors at the start of the server. The latest code is at https://github.com/igniting/server/commits/selfTuningOptimizer. I have also attached the diff here. Ho

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-27 Thread Roberto Spadim
nice :) maybe part of msql? :) very old times nice, i will stay updated with this gson project, very interesting and a very good work :) 2014-05-27 15:35 GMT-03:00 Sergei Golubchik : > Hi, Roberto! > > On May 27, Roberto Spadim wrote: > > Hi Sergei! > > nice :) i'm reading about it > > just one

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-27 Thread Sergei Golubchik
Hi, Roberto! On May 27, Roberto Spadim wrote: > Hi Sergei! > nice :) i'm reading about it > just one doubt i didn't understand everything yet > there's a read time and a scan time, what the difference? read = sequencial > read and scan = non sequencial read? or something like table read cost, > in

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-27 Thread Roberto Spadim
Hi Sergei! nice :) i'm reading about it just one doubt i didn't understand everything yet there's a read time and a scan time, what the difference? read = sequencial read and scan = non sequencial read? or something like table read cost, index read cost? 2014-05-27 5:41 GMT-03:00 Sergei Golubchik

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-27 Thread Sergei Golubchik
Hi, Roberto! On May 26, Roberto Spadim wrote: > hi guys, one question, that maybe at the right time could be answered... > with the new cost model, maybe at explain we could have a new information > about how many time we will expend? and maybe something like, estimate time > / executed time (via

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-26 Thread Roberto Spadim
hi guys, one question, that maybe at the right time could be answered... with the new cost model, maybe at explain we could have a new information about how many time we will expend? and maybe something like, estimate time / executed time (via show warnings?) i will read the patch about this work,

Re: [Maria-developers] [GSoC] self-tuning optimizer

2014-05-26 Thread Sergei Golubchik
Hi, Anshu! On May 25, Anshu Avinash wrote: > Hi all, > > You can find my this week's blog entry at > http://igniting.in/gsoc2014/2014/05/25/coding-things-up/ . I have created a > branch on launchpad for my work: > http://bazaar.launchpad.net/~igniting/maria/maria/revision/4211 . You can > give yo