From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Subject: Re: [Cuirass] Missing database indexes? Date: Fri, 16 Nov 2018 23:42:41 +0100 Message-ID: <20181116234241.48f41385@alma-ubu> References: <87va54yh0c.fsf@gnu.org> <20181110211128.6dc522da@alma-ubu> <87k1ljr1c7.fsf@gnu.org> <20181112195044.6d64f51c@alma-ubu> <87h8glwg7d.fsf@lassieur.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/DnI8znl_vrw.z+XOACRa9=x"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNmp5-0000kf-HS for guix-devel@gnu.org; Fri, 16 Nov 2018 17:42:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNmp1-0000br-Ir for guix-devel@gnu.org; Fri, 16 Nov 2018 17:42:47 -0500 In-Reply-To: <87h8glwg7d.fsf@lassieur.org> 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?B?Q2zDqW1lbnQ=?= Lassieur Cc: guix-devel@gnu.org --Sig_/DnI8znl_vrw.z+XOACRa9=x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 13 Nov 2018 09:10:30 +0100 Cl=C3=A9ment Lassieur wrote: > Hi Bj=C3=B6rn, >=20 > Bj=C3=B6rn H=C3=B6fling writes: >=20 > > We are directly relying on the rowid here, there is no explicit > > id-column. > > > > This could lead to unpredicted results and reorderings (6th Quirk in > > document): > > > > https://www.sqlite.org/rowidtable.html > > > > We should add a column: > > > > id INTEGER PRIMARY KEY AUTOINCREMENT > > > > Problem is that this concept of AUTOINCREMENT does only work for > > Primary Keys in Sqlite. So we need to degrade "derivation" to a > > secondary key, i.e. make it non-null and unique: > > > > derivation TEXT NOT NULL UNIQUE, > > > > Is there anything speaking against that? =20 >=20 > We only use that rowid to display a number at the left of every > 'build' row. I think it would make more sense to use the derivation > name where we currently use the rowid. It would also be more > understandable for the users. >=20 > We don't even need rowid for sorting because we can sort with the > timestamps. >=20 > The only issue is that we get further from hydra, but we are already > pretty far away anyway. I'm undecided about this, I don't understand enough of it yet. In some sense I would prefer a numeric id to refer to. On the other hand the derivation is the actual key, and if that is generated a second time, the build is the same and will not be executed again. Bj=C3=B6rn --Sig_/DnI8znl_vrw.z+XOACRa9=x Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlvvR+EACgkQvyhstlk+X/3eegCcC+MySghl48HX7e4bBuVfcvg5 iYwAoLRi7Bpuuj7QVuCPjaj9vWmiQzap =9/9C -----END PGP SIGNATURE----- --Sig_/DnI8znl_vrw.z+XOACRa9=x--