[EMAIL PROTECTED] wrote:
Robin Breathe <[EMAIL PROTECTED]> wrote:
Hugh Gibson wrote:
I'm intrigued. How do you get SQLite to use a multi-column index as it's
primary key (i.e. B-tree hash)? Please elaborate.
Simply
CREATE TABLE TransactionList (sTransactionID Text(13)
[EMAIL PROTECTED] wrote:
"Miha Vrhovnik"<[EMAIL PROTECTED]> wrote:
Subject:
=?ISO-8859-1?Q?Re=3A=20Re=3A=20=5Bsqlite=5D=20Rewriting=20a=20query?=
What RFC do I need to read to figure out how to decode the Subject
line (presumably inserted by si.Mail)?
RFC 2047 "MIME (Multipurpose Internet
--- [EMAIL PROTECTED] wrote:
> Robin Breathe <[EMAIL PROTECTED]> wrote:
> > Hugh Gibson wrote:
> > >> I'm intrigued. How do you get SQLite to use a multi-column index as it's
> > >> primary key (i.e. B-tree hash)? Please elaborate.
> > >
> > > Simply
> > >
> > > CREATE TABLE TransactionList
[EMAIL PROTECTED] je ob 30.9.2005 12:22:47 napisal(a):
>(Side note: I am experimenting with a new Mail User Agent that
>uses SQLite to store all its email messages. I appologize in advance
>if this message is misformatted or otherwise garbled.)
Am. Who stole that idea from me?
--
It's time to
Robin Breathe <[EMAIL PROTECTED]> wrote:
> Hugh Gibson wrote:
> >> I'm intrigued. How do you get SQLite to use a multi-column index as it's
> >> primary key (i.e. B-tree hash)? Please elaborate.
> >
> > Simply
> >
> > CREATE TABLE TransactionList (sTransactionID Text(13) DEFAULT
> >
Hugh Gibson wrote:
>> I'm intrigued. How do you get SQLite to use a multi-column index as it's
>> primary key (i.e. B-tree hash)? Please elaborate.
>
> Simply
>
> CREATE TABLE TransactionList (sTransactionID Text(13) DEFAULT
> '',sCommunityID Text(13) DEFAULT '',sObject Text(13) , PRIMARY KEY
> I'm intrigued. How do you get SQLite to use a multi-column index as it's
> primary key (i.e. B-tree hash)? Please elaborate.
Simply
CREATE TABLE TransactionList (sTransactionID Text(13) DEFAULT
'',sCommunityID Text(13) DEFAULT '',sObject Text(13) , PRIMARY KEY
(sCommunityID,
Hugh Gibson wrote:
>> What happens if you create the index on sCommunityID only? Does
>> it still do the full table scan?
>
> A bit difficult to drop the (sCommunityID, sTransactionID) index, as it's
> the primary key.
I'm intrigued. How do you get SQLite to use a multi-column index as it's
> What happens if you create the index on sCommunityID only? Does
> it still do the full table scan?
A bit difficult to drop the (sCommunityID, sTransactionID) index, as it's
the primary key.
> Also, don't overlook using UNION or UNION ALL, ugly as they
> can be. Maybe something like this
What happens if you create the index on sCommunityID only? Does
it still do the full table scan?
Also, don't overlook using UNION or UNION ALL, ugly as they
can be. Maybe something like this could be used to avoid creating
a very small temporary table:
SELECT ... FROM (SELECT ... UNION SELECT
The following works for me. The Community table has only one entry per
community ID so it's fast to look up.
SELECT sCommunityID, (SELECT sTransactionID
FROM TransactionList
WHERE sCommunityID = Community.sCommunityID
I have this query:
SELECT sCommunityID, max(sTransactionID)
FROM TransactionList
WHERE sCommunityID in ('a03061bFi','a03064KDy', 'a03068QhK')
GROUP BY sCommunityID
There is an index on (sCommunityID, sTransactionID)
This forces a table scan (perhaps improved
12 matches
Mail list logo