Re: [sqlite] Slow View when it is used in a where clause

2011-12-02 Thread Pavel Ivanov
> Specifically, when I said "using directly the select of the view", I mean > execute this query: > > EXPLAIN QUERY PLAN SELECT wg.*, count(DISTINCT w.idWord) AS itemsCount, > count(DISTINCT dw.Document_idDocument) AS documentsCount > > FROM WordGroup wg >    LEFT OUTER JOIN Word w ON

Re: [sqlite] Slow View when it is used in a where clause

2011-12-02 Thread Manuel Jesus Cobo Martin
Hello Pavel, Thank you for your answer. Probably, as you have commented, the problem is that the optimizer of SQLite does not work fine in this case. Specifically, when I said "using directly the select of the view", I mean execute this query: EXPLAIN QUERY PLAN SELECT wg.*,

Re: [sqlite] Slow View when it is used in a where clause

2011-12-02 Thread Pavel Ivanov
> I have been analyzing the Query PLAN. In the query "Select * FROM > WordGroupView Where idWordGroup = 1;" the database engine perform a scan > over WordGroup table, and it is not necessary since the where clause is > defined. However, using directly the query of the view change the SCAN by a >

[sqlite] Slow View when it is used in a where clause

2011-12-01 Thread Manuel Jesus Cobo Martin
Hello, I am new in this mailing list. I am developing a Java tool and I use SQLite as file format. At this moments, I did not have any problem, and SQLite works quite fine. I want to create some views to generate statistical and aggregate data in order to show more information to the user.