On Wed, Sep 24, 2008 at 01:35:40AM -0400, Alex Scotti wrote: > On Sep 24, 2008, at 1:13 AM, Alex Scotti wrote: > > On Sep 23, 2008, at 2:35 PM, Jay A. Kreibich wrote: > >> It doesn't "blatantly" anything. Indexes are outside of the > >> Relational Model and have nothing to do with it. They're > >> orthogonal. > >> From that, anything having to do with creating, using, or > >> manipulating indexes is outside the model. > >> > >> Within any actual real-world RDBMS product, however, once you > >> accept > >> the need for indexes (on any level) then it shouldn't be hard to > >> accept the desire to control how those indexes are used. > > > > no. no no no. i don't know how to convince you of this deep > > mistake other than beating you over the head with your own words. > > > > > > as i said, i give up. > > > > at the point where the conversations look this, i begin to worry: > > > > question: "my query runs very slowly! i don't understand why!?" > > answer: "just append this glob of sqlite specific crud to your > > query and it runs great!" > > > > question: "this query runs slow also!" > > answer: "just code in raw vdbe instructions, you'll have absolute > > control over the choice of index usage!" > > > > question: "this query runs slowly still!!" > > answer: you should be using berkeley db. they give you absolute > > control over everything.
But every commercial SQL RDBMS seems to have syntax for index control. I see an admission there that it's really difficult for an RDBMS to take a query and make the system go as fast as possible without more information (namely, an analysis of typical data and queries). If SQLite3 can do better than the rest on this, then it has a bright future indeed. Otherwise to then provide less control over index use than other choices needs to be justified on "that's what lite means" grounds. (I've no idea whether which is easier to implement: specific or generic index control directives.) A tool to generate an appropriate indexing strategy given a set of queries and model database contents would be great. But if there were still times when the optimizer would pick the wrong plan for a given query and making it pick a better plan would be ETOOHARD then index use directives is really not a terrible thing to settle for. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users