Re: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Dennis Cote
Александр Прокофьев wrote: I've tried running versions of query that you suggested and got following results: Originally posted version 4.5 sec Version with only first-part of where clause 16 ms Yes, but this version isn't finding the same rows. :-) Rewritten version without

RE: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Александр Прокофьев
1:04 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] FW: Performance problem with complex where clause regarding: "So it seems that indexes are not used at all, and that is pretty strange" There's a great feature in sqlite that lets you know for sure. Prefix your query with: EX

RE: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Griggs, Donald
regarding: "So it seems that indexes are not used at all, and that is pretty strange" There's a great feature in sqlite that lets you know for sure. Prefix your query with: EXPLAIN QUERY PLAN SELECT . And you can see just which, if any indices are used. For a more detailed

RE: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Александр Прокофьев
:[EMAIL PROTECTED] Sent: Wednesday, May 02, 2007 6:58 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] FW: Performance problem with complex where clause Александр Прокофьев wrote: > I'm running a query against sqlite database and it runs very slow - about 5 > seconds(on larger database it c

Re: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Dennis Cote
Samuel R. Neff wrote: Will the original poster still run into performance problems where sqlite will only use one index per table so if targetid matches on a ton of rows sqlite has to scan them all for the matching sourceid? Perhaps a multi-column index would be appropriate here to index both

RE: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Samuel R. Neff
Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 02, 2007 10:58 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] FW: Performance problem with complex where clause ... This should run in a reasonable time given that you have indexes on Link("Target.Id") and Link

Re: [sqlite] FW: Performance problem with complex where clause

2007-05-02 Thread Dennis Cote
Александр Прокофьев wrote: I'm running a query against sqlite database and it runs very slow - about 5 seconds(on larger database it can ran for a whole minute). Select [Node_Entity].* From [Node] AS [Node_Node] JOIN [Entity] AS [Node_Entity] ON [Node_Node].LOCAL_ID =