Re: [sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Kees Nuyt
On Sat, 9 Oct 2010 12:20:26 +0200, Joerg Sonnenberger wrote: >Hi all, >I'm seeing high disk IO and associated processing overhead in the >following situation, which shouldn't be as expensive as it currently is. > >Schema: >CREATE TABLE symbol (file integer NOT NULL REFERENCES

Re: [sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Drake Wilson
Quoth Joerg Sonnenberger , on 2010-10-09 12:20:26 +0200: > Schema: > CREATE TABLE symbol (file integer NOT NULL REFERENCES file (id), symbol > varchar NOT NULL, revision varchar NOT NULL, branch boolean NOT NULL, > UNIQUE (file, symbol)); > > Query: > SELECT DISTINCT symbol FROM

[sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Joerg Sonnenberger
Hi all, I'm seeing high disk IO and associated processing overhead in the following situation, which shouldn't be as expensive as it currently is. Schema: CREATE TABLE symbol (file integer NOT NULL REFERENCES file (id), symbol varchar NOT NULL, revision varchar NOT NULL, branch boolean NOT NULL,