On 22 February 2016 at 17:07, Michele Pradella
wrote:
> CREATE INDEX indexAB ON test(DateTime,CarPlate);
CREATE INDEX indexA ON test(DateTime);
>
So if I have a query like this
>>> "SELECT * FROM table_name WHERE DateTime>> DateTime>VALUE_MIN"
>>>
>>
> Generally speaking,
> On 22 Feb 2016, at 9:07am, Michele Pradella
> wrote:
>
>> Already done this check. My last question was about to reduce the number of
>> indexes on table avoiding kill a "quite unnecessary" index that if used do a
>> better job that the other.
>> Generally speaking, I think that if you use a
>>> Your indexes are badly designed.
>>>
>>> You require the following two indexes:
>>> CREATE INDEX indexAB ON test(DateTime,CarPlate);
>>> CREATE INDEX indexBA ON test(CarPlate,DateTime);
>>>
>>> The indexes:
CREATE INDEX indexA ON test(DateTime);
CREATE INDEX indexB ON test(CarPlate);
; that query have to
do if we use indexAB instead index?
>
>> -Original Message-
>> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-
>> bounces at mailinglists.sqlite.org] On Behalf Of Michele Pradella
>> Sent: Friday, 19 February, 2016 01:07
On 22 Feb 2016, at 9:07am, Michele Pradella
wrote:
> Already done this check. My last question was about to reduce the number of
> indexes on table avoiding kill a "quite unnecessary" index that if used do a
> better job that the other.
> Generally speaking, I think that if you use and index
On 22 Feb 2016, at 8:39am, Michele Pradella
wrote:
>> Your indexes are badly designed.
>>
>> You require the following two indexes:
>> CREATE INDEX indexAB ON test(DateTime,CarPlate);
>> CREATE INDEX indexBA ON test(CarPlate,DateTime);
>>
>> The indexes:
>>> CREATE INDEX indexA ON test(DateTi
I supposed your SQL command like this
"select * from table where (DateTime>X AND
DateTimeX AND
DateTimemailto:michele.pradella at selea.com>
: ?2016/?2/?19 16:06
???: sqlite-users at mailinglists.sqlite.org<mailto:sqlite-users at
mailinglists.sqlite.org>
??:
On 19 Feb 2016, at 10:34am, Michele Pradella
wrote:
> Ok but the question is: can a statement (SELECT * FROM table WHERE (field1
> LIKE 'TEXT%')AND(field2>=X)AND(field2<=Y)) use the index created on
> multicolumn field1,field2? or I use it only if I have file1 IN,=,IS?
> Which is the best ind
Michele Pradella wrote:
>> Michele Pradella wrote:
>>> so there's no way to use that kind of double column index on a select like
>>> explain query plan select * from test where (CarPlate LIKE 'AA000%') AND
>>> (DateTime>1);
>>> because at least one field have to do with operator = correct?
>>
>>
> (please don't top-post)
>
> Michele Pradella wrote:
>> so there's no way to use that kind of double column index on a select like
>> explain query plan select * from test where (CarPlate LIKE 'AA000%') AND
>> (DateTime>1);
>> because at least one field have to do with operator = correct?
> No,
(please don't top-post)
Michele Pradella wrote:
> so there's no way to use that kind of double column index on a select like
> explain query plan select * from test where (CarPlate LIKE 'AA000%') AND
> (DateTime>1);
> because at least one field have to do with operator = correct?
No, the number
because at least one field have to do with operator = correct?
no can be one of = or IN or IS but not LIKE operator
Selea s.r.l.
Michele Pradella R&D
SELEA s.r.l.
Via Aldo Moro 69
Italy - 46019 Cicognara (MN)
Tel +39 0375 889091
Fax +39 0375 889080
*michele.pradella at selea.c
Ok understand, so there's no way to use that kind of double column index
on a select like
explain query plan select * from test where (CarPlate LIKE 'AA000%') AND
(DateTime>1);
because at least one field have to do with operator = correct?
Selea s.r.l.
Michele Pradella R&D
SE
Michele Pradella wrote:
> CREATE TABLE test (DateTime BIGINT,CarPlate VARCHAR(255));
> CREATE INDEX indexA ON test(DateTime);
> CREATE INDEX indexB ON test(CarPlate);
> CREATE INDEX indexAB ON test(DateTime,CarPlate);
>
> EXLPAIN QUERY PLAN SELECT * FROM test WHERE (DateTime>1)AND(DateTime<100) AND
rg
> Subject: [sqlite] Multiple Column index
>
> Hi all, I have a question about using index with multiple column.
> Take this test case
> CREATE TABLE test (DateTime BIGINT,CarPlate VARCHAR(255));
> CREATE INDEX indexA ON test(DateTime);
> CREATE INDEX indexB ON test(CarPlate
Hi all, I have a question about using index with multiple column.
Take this test case
CREATE TABLE test (DateTime BIGINT,CarPlate VARCHAR(255));
CREATE INDEX indexA ON test(DateTime);
CREATE INDEX indexB ON test(CarPlate);
CREATE INDEX indexAB ON test(DateTime,CarPlate);
now if you do
[1] -> EXLPA
s.sqlite.org
Betreff: [sqlite] Multiple Column index
Hi all, I have a question about using index with multiple column.
Take this test case
CREATE TABLE test (DateTime BIGINT,CarPlate VARCHAR(255)); CREATE INDEX indexA
ON test(DateTime); CREATE INDEX indexB ON test(CarPlate); CREATE INDEX index
17 matches
Mail list logo