Hi,

I am using SQLite version 3.9.2 on WinCE devices. I have below table in one
of my databases. Table sometimes holds 1.5 to 3 million records in it. That
database is reached for read-only purposes and created from scratch in a PC
if its contents needs to be updated. All database files, application, and
some application related files are on a microSD card. Brand and size is
changing from device to device.

Database opened using below pragmas:
PRAGMA page_size=4096;
PRAGMA journal_mode=MEMORY;
PRAGMA temp_store=2; // Memory temp store
PRAGMA locking_mode=EXCLUSIVE;

Table create SQL:
CREATE TABLE URUN(
 Barkod Char(30) NOT NULL PRIMARY KEY,
 UrunKodu Char(50),
 UrunAciklamasi Char(60),
 UrunGrubu Char(30),
 Renk Char(20),
 Beden Char(20),
 Cup Char(20),
 OlcuBirimi Char(10),
 SeriNo Char(1),
 Lot Char(1),
 SKT Char(1)
);

My question is, if I add following index, will it make my searches faster?

CREATE UNIQUE INDEX IDX_BARKOD_DESC ON URUN(BARKOD);

Application is developed using Lazarus 1.6. Table is opened in a TSQLQuery
and searches coded using "TSQLQuery.Locate('Barkod', Search_Value, []);"

Thanks & Regards,
Ertan K???ko?lu


Reply via email to