Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E54672B286A for ; Mon, 25 Jun 2012 17:15:50 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjFhI-0002AF-8x for pgsql-performance@postgresql.org; Mon, 25 Jun 2012 20:15:49 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q5PKFVWR029683 for ; Mon, 25 Jun 2012 16:15:31 -0400 (EDT) From: Tom Lane To: pgsql-performance@postgresql.org Subject: Re: MemSQL the "world's fastest database"? In-reply-to: <201206251802.060128@ms20.lnh.mail.rcn.net> References: <4FE899CE.60901@optionshouse.com> <201206251802.060128@ms20.lnh.mail.rcn.net> Comments: In-reply-to message dated "Mon, 25 Jun 2012 14:02:41 -0400" Date: Mon, 25 Jun 2012 16:15:31 -0400 Message-ID: <29682.1340655331@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/138 X-Sequence-Number: 47164 writes: >> Then there's this from the article: >> >> "The key ideas are that SQL code is translated into C++, so avoiding the >> need to use a slow SQL interpreter, and that the data is kept in memory, >> with disk read/writes taking place in the background." >> >> Besides the nonsense statement that SQL is translated to C++ (Lexical >> scanners would circumvent even this step, and does that mean you have to >> literally compile the resulting C++? Ridiculous.) ... > DB2 on the mainframe (if memory serves), for one, will compile static SQL to machine code. Not that unusual. Yeah. Actually such techniques go back at least to the fifties (look up "sort generators" sometime). They are out of fashion now because (1) the achievable speed difference isn't what it once was, and (2) programs that execute self-modified code are prone to seriously nasty security issues. Get any sort of control over the code generator, and you can happily execute anything you want. regards, tom lane