Hello

I have the following schema:

1)Table: dvrpAudioSourceTable

[varchar]        [int]     [int]           [int]              [int]      [varchar]
sourceIndex | dsuIp | dsuPort | sourceType | workIp | SourceName|


2)Table: dvrpAudioFileTable

[int]    [varchar]    [int]          [int]
fileId | filePath | startTime | endTime

3)Table: dvrpIndexTable

[varchar]         [int]
sourceIndex | fileId

I need to perform the following query:


select a.sourceIndex, a.dsuIP, a.dsuPort, a.sourceType, a.workIp, a.SourceName, 
b.fileId, b.filePath, b.startTime, b.endTime from dvrpAudioSourceTable a, 
dvrpAudioFileTable b, dvrpIndexTable c where b.startTime>= 100 and b.endTime <= 200 
and c.fileId = b.fileId and a.sourceIndex = c.sourceIndex order by a.sourceIndex, 
b.fileId;

Currently on Sqlite version 2.8.13, this query on tables with 1000 rows each, returns 
50 rows but it takes about 30 seconds. Is there anyway to significantly speed up this 
query?

Using 'PRAGMA default_synchronous = OFF;' made no difference.

Thanks very much in advance.


Reply via email to