On Dec 2, 2007 1:43 PM, Derick Rethans <[EMAIL PROTECTED]> wrote: > Hello Troels, > > On Sun, 2 Dec 2007, troels knak-nielsen wrote: > > Also, does "simple" mean that it's a constant cost or what happens, > > when the size of the tree scales? I'm sure, an in-depth answer gets > > rather complex, but some indication of how each operation scales, > > would be most informative. > > That's basically what the table tries to say without reverting to O > notations. The value "Simple Operation" tells you that the backend only > has to do one (or two or three) queries to get the result - and that the > number of queries is always constant. So it means constant, right? Perhaps that would be a better description to put in the documentation then?
> > For example, I'm not entirely sure, what the implications of using > > LIKE on large datasets is? I suppose, that in theory, LIKE should be > > able to perform reasonably well, since the match is anchored, but I'm > > not sure how well MySql (We use MySql) works. > > I'm not a real MySQL guru either, but I could run some benchmarks on > this next week I suppose. If you have a more specific question about > the cost of an operation, I'd be happy to explain you the algorithm. I could run a benchmark as well, but to my experience, databases are bit like black magic. Just blindly running a benchmark, may test the wrong thing. I'll try to investigate a bit further and post back here, if I find get any wiser. On Dec 2, 2007 2:47 PM, Gaetano Giunta <[EMAIL PROTECTED]> wrote: > Using the 'like' operator has usually the same cost as using an equality > operator, regardless of db, so there is no huge speed penalty involved, if > any at all. > Otoh index selectivity plays a big role in performance: the more rows > (children) a select fetches, the more it will be slower compared to a select > done on eg. the pk (note: this is all unscientific evidence, gathered from > tests on ezpublish installations done with mysql). The question is really, if MySql can make use of indices, when using LIKE. I'm guessing, that it might be able, as long as the pattern is anchored -- Which would be the case, when searching by a materialised path. -- troels -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
