From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Biscuolo Subject: postgresql vs sqlite for Cuirass (was Re: Hackathon: Mumi and Cuirass) Date: Thu, 16 May 2019 16:22:23 +0200 Message-ID: <87imuabhsw.fsf@roquette.mug.biscuolo.net> References: <875zqrgqlf.fsf@elephly.net> <20190506225554.43e93d0d@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRHHX-0002Iw-Vh for guix-devel@gnu.org; Thu, 16 May 2019 10:22:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRHHW-0007Ov-Q3 for guix-devel@gnu.org; Thu, 16 May 2019 10:22:51 -0400 Received: from ns13.heimat.it ([46.4.214.66]:43824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRHHU-0007IX-IU for guix-devel@gnu.org; Thu, 16 May 2019 10:22:49 -0400 In-Reply-To: <20190506225554.43e93d0d@alma-ubu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?Q?Bj=C3=B6rn_H=C3=B6fling?= , Ricardo Wurmus Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Bj=C3=B6rn, Bj=C3=B6rn H=C3=B6fling writes: [...] >> 2) Cuirass > > On Guix days, we discussed the idea of using Postgresql as a backend. Please do you remember the rationale behind this idea? What is the issue with using sqlite? Why a client/server approach vs an embedded database? I don't have much experience with web applications backed by sqlite, but AFAIU sqlite is sometime "misunderstood" Some interesting arguments from sqlite developer: https://sqlite.org/whentouse.html#website =2D-8<---------------cut here---------------start------------->8--- Dynamic content uses about 200 SQL statements per webpage. This setup runs on a single VM that shares a physical server with 23 others and yet still keeps the load average below 0.1 most of the time. =2D-8<---------------cut here---------------end--------------->8--- https://sqlite.org/np1queryprob.html =2D-8<---------------cut here---------------start------------->8--- 200 SQL statements per webpage is excessive for client/server database engines like MySQL, PostgreSQL, or SQL Server. But with SQLite, 200 or more SQL statement per webpage is not a problem. SQLite can also do large and complex queries efficiently, just like client/server databases. But SQLite can do many smaller queries efficiently too. Application developers can use whichever technique works best for the task at hand. [...] N+1 Queries Are Not A Problem With SQLite =2D-8<---------------cut here---------------end--------------->8--- [...] Thanks! Gio' =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlzdciAACgkQ030Op87M ORILrw//RTz8n+hwktrUvB5JxNkJpcRbpbUKZGb28DqZ/XRBOT12NM0qNx0LhhhE dSkdzOPY7e3Yy49J45PReOs1CdXZCsoejftgTRx+C9/BI9clWjHpqaHPTbPLbKRx C90rfAiCYjrsiB5UKhoDHOI1Lix1qfvQW8Lyx0n/3230KQmGE/2aMnWpnOLvIVHm 4X5Cd7nPYmtA5mzd0k8GUv8Q25j0AERMR9SL/4zv8lOIOwNNcTFhEwB2fNfCQNIX 6C9ejjufxnlZTS8R02DIIYj+xA9CdT0nwI60vfh1UXIlPIY1/LBonvufv+bKhf7m 4wDQ9zGyMrWISV/DQZppWJHOO/VQb7Fb9QqFTybQXXNaGY2obWamg2jQLD/LEwmt AUjGf2pDOnnMGirvi+tPeOj+KLkoH8dTn2P7U1UiLHQR0xc9KAX7PYjyMEGCbCir f8UJ+chRm7iqh60wsDRTnvnrXl0TRwxCeBk7Loln3ab1h3V+iCfK6N6GHv9xh/B6 jojhhVETEywnq5drsAAmXpHX1SYyABUzYxOMmbmgY+tq/tvscVlh9gsmVGmLxk8B plzDYsqFRRhnFp98/0eBfBfXhp9AX0YTR0VS7aEiFGrshfZp/3bztKjOCUstUEGr ZwP9ZpGN8gQVYUx/FGcchuo/OdVa/VxcSSJ5tyB0MuRvhoI6OiU= =Ixpq -----END PGP SIGNATURE----- --=-=-=--