On 14 Oct 2012, at 8:07pm, Ryan Johnson <ryan.john...@cs.utoronto.ca> wrote:
> On 14/10/2012 2:26 PM, Pavel Ivanov wrote: >>> What kind of interpreter does the query executor uses? How important is the >>> interpreter's speed, to SQLite's speed ? >> SQLite doesn't have interpreter, it has parser. I guess this makes the >> rest of your email inapplicable. > Umm... yes it does. http://www.sqlite.org/vdbe.html > > For the OP's question, it's very efficient compared to what I've seen in, > say, postgres, but I don't know how it would compare to something like python > or ruby. SQLite is pretty good. Python is widely seen as slow, though it's not really, it's just difficult to write a fast interepreter for such general code. Ruby is about the same, with the same problems. SQLite can and is highly optimised for doing the things SQL needs done and nothing else. It doesn't have to have the flexibility of a general-purposes programming language, so the opcodes are better designed for database management. And it has a great benefit that EXPLAIN and EXPLAIN QUERY PLAN are excellent tools which have been used to figure out problems and improve it still further. Someone without experience is not going to be able to just dive in and make something better. Huge effort is going on right now to speed up JavaScript so that's a crowded market. If you're looking for something to speed up, aim at Python. On 14 Oct 2012, at 9:08pm, Pavel Ivanov <paiva...@gmail.com> wrote: > Maybe there's some conflict of terminology here. But as I understand > it converting SQL query into a set of opcodes representing all > operations needed to execute the query and then executing these > opcodes is not interpreting, it's parsing. Interpreting is more > related to some full-blown execution languages like python, perl, > javascript or something like that. The 'interpreter' phase of SQLite is turning SQL commands into VDBE opcodes. The first phase of that is parsing. But at this level were just haggling over language. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users