Hick Gunter wrote:
>create the primary key index ordered properly
>
>CREATE TABLE t (..., PRIMARY KEY ( a ASC, b DESC)...);
DESC is not necessary here; SQLite has no problem reading the index
in reverse order, if needed.
(DESC in an index is useful only when you want to optimize multiple
ORDER BY
: Montag, 29. Dezember 2014 09:34
An: General Discussion of SQLite Database
Betreff: [sqlite] Partial index to find maximum
Hi,
I have a table with a 2 column PK, say 'a' and 'b'. I need to find, for a given
value of 'a', the highest matching 'b'. The query
..@sqlite.org] On Behalf Of Baruch Burstein
>Sent: Monday, 29 December, 2014 01:34
>To: General Discussion of SQLite Database
>Subject: [sqlite] Partial index to find maximum
>
>Hi,
>
>I have a table with a 2 column PK, say 'a' and 'b'. I need to find, for a
&g
On 29/12/2014 4:33 PM, Baruch Burstein wrote:
Hi,
I have a table with a 2 column PK, say 'a' and 'b'. I need to find, for a
given value of 'a', the highest matching 'b'. The query itself it simple:
SELECT max(b) FROM t WHERE a=:whatever
To speed this up, I would add an index on 'a'. Now,
Hi,
I have a table with a 2 column PK, say 'a' and 'b'. I need to find, for a
given value of 'a', the highest matching 'b'. The query itself it simple:
SELECT max(b) FROM t WHERE a=:whatever
To speed this up, I would add an index on 'a'. Now, the question is is
there some way to tell the ind
5 matches
Mail list logo