« Projection optimisation | Main | Pushing selections »

November 29, 2004

Looking at Kleisli again

I tried working on the other SQL optimisations (selection and joint optimisations). To do this, I wanted to see how Kleisli was doing it. I ended up trying (unsuccessfully) to compile Kleisli and reading tons of code: I am not sure I understand better though. I did however start to understand some parts of the general architecture of Kleisli.

I also noticed that the projection optimisation I had implemented had a sad limitation: the optimiser doesn't take into account functions applied to an 'iteration variable' (a variable defined from a generator expression in a comprehension). This means that if this expression is optimised [bag x.#a | ^x <bag table ... from db] this one isn't [bag (fun ^x->x.#a)(x) | ^x <bag table ... from db]. I will have to think about the best way to solve that.