[sqlite] Using Eclipse on Windows XP

2009-01-10 Thread Alex Krzos
Is there an easy way to develop on sqlite using eclipse for C/C++ on a Windows XP machine? I have eclipse open on a source directory but can not compile. Is there a possible faq or wiki on this? Thanks. Alex ___ sqlite-users mailing list

Re: [sqlite] Getting the "position" (like LIMIT) for a query

2009-01-10 Thread Gene
That is what I did, did my select into a temp table filtered and sorted just the way I wanted it and used the rowid since it would match the index in the list control. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Nicolas

Re: [sqlite] Getting the "position" (like LIMIT) for a query

2009-01-10 Thread Lukas Haase
Igor Tandetnik schrieb: > "Lukas Haase" wrote in > message news:gkat07$n2...@ger.gmane.org >> I use an SQLite database to fill a virtual list control in Windows. In >> this control, I just tell the control the numer of my elements and the >> control tells me for which range

Re: [sqlite] Getting the "position" (like LIMIT) for a query

2009-01-10 Thread Nicolas Williams
On Sat, Jan 10, 2009 at 04:33:19PM -0500, Igor Tandetnik wrote: > "Lukas Haase" wrote in > message news:gkat07$n2...@ger.gmane.org > > "SELECT keyword FROM keywords ORDER BY keyword LIMIT %d, %d", iFrom, > > iTo-iFrom." > > > > I use an SQLite database to fill a virtual list

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-10 Thread P Kishor
On Sat, Jan 10, 2009 at 7:58 AM, Lukas Haase wrote: > D. Richard Hipp schrieb: >> On Jan 9, 2009, at 3:16 PM, Lukas Haase wrote: >>> SELECT t.topic, t.length >>> FROM printgroup AS pg1 >>> LEFT JOIN printgroup AS pg2 ON pg1.printgroup = pg2.printgroup >>> LEFT JOIN topics AS t

Re: [sqlite] Getting the "position" (like LIMIT) for a query

2009-01-10 Thread Igor Tandetnik
"Lukas Haase" wrote in message news:gkat07$n2...@ger.gmane.org > I use an SQLite database to fill a virtual list control in Windows. In > this control, I just tell the control the numer of my elements and the > control tells me for which range data is needed.

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-10 Thread Nicolas Williams
On Sat, Jan 10, 2009 at 02:58:57PM +0100, Lukas Haase wrote: > > What is it that you think a LEFT JOIN does? > > (A LEFT JOIN B) joins together table A and B while all records are taken > from A and only records that match both are takes from B. If a record > from A has no corresponding data

[sqlite] Getting the "position" (like LIMIT) for a query

2009-01-10 Thread Lukas Haase
Hello, I use an SQLite database to fill a virtual list control in Windows. In this control, I just tell the control the numer of my elements and the control tells me for which range data is needed. For example I set: SELECT COUNT(*) FROM keywords; to tell the control the numer of elements.

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-10 Thread D. Richard Hipp
When you have an inner join like this: SELECT * FROM a JOIN b ON a.x=b.y WHERE b.z=123; then the SQL engine is free to interchange the order of the tables in the join. For example, the join might be implemented as: SELECT * FROM b JOIN a ON a.x=b.y WHERE b.z=123

Re: [sqlite] Documentation to learn sqlite code for newbies?

2009-01-10 Thread Kees Nuyt
On Sat, 10 Jan 2009 11:01:01 + (GMT), silvio grosso wrote in General Discussion of SQLite Database : > Hello everybody, > > Does anyone know a link (Internet) where I can find > some simple tutorials regarding sqlite code? http://sqlzoo.net/

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-10 Thread Lukas Haase
Kees Nuyt schrieb: > On Fri, 09 Jan 2009 21:16:03 +0100, Lukas Haase > wrote in General Discussion of SQLite > Database : > >> Hello Richard! >> >> Thank you very much!! It works! :-) >> >> >> Indeed. 0-10 milliseconds instead of 500-800 :-) >> >> But

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-10 Thread Lukas Haase
D. Richard Hipp schrieb: > On Jan 9, 2009, at 3:16 PM, Lukas Haase wrote: >> SELECT t.topic, t.length >> FROM printgroup AS pg1 >> LEFT JOIN printgroup AS pg2 ON pg1.printgroup = pg2.printgroup >> LEFT JOIN topics AS t ON t.topicID = pg2.topicID >> LEFT JOIN topic_ids AS ti ON ti.topicID =

Re: [sqlite] Why the difference in these 2 SQLite files?

2009-01-10 Thread RB Smissaert
Some progress in this. Doing a trivial file write (set Read-Only to True and then back to False) gives me the same speed benefit. So at least this takes SQLite out of the equation in solving this problem. RBS -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] newbie question regarding my sqlite code

2009-01-10 Thread Emil Obermayr
Am Samstag, 10. Januar 2009 schrieb silvio grosso: > The query is: > select avg(age), avg(durata), sum(età) from acoda, main, dipendenti This is "cross join" over all three tables. The result is a "monster table", consisting of every possible combination of the records of those three tables.

Re: [sqlite] newbie question regarding my sqlite code

2009-01-10 Thread RB Smissaert
Try this: select avg(age) from acoda union all select avg(durata) from main union all select sum(età) from dipendenti RBS -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of silvio grosso Sent: 10 January 2009 10:41 To:

[sqlite] Documentation to learn sqlite code for newbies?

2009-01-10 Thread silvio grosso
Hello everybody, Does anyone know a link (Internet) where I can find some simple tutorials regarding sqlite code? I am looking for some code to apply using the select condition. I am an accountant as trade and I have many big .csv files. I would like to learn sqlite code to query them. At

[sqlite] newbie question regarding my sqlite code

2009-01-10 Thread silvio grosso
Hello, I am a new sqilte user and I am learning sqlite code in my spare time.. I have always used sql code with Microsoft Access and Base (openoffice). Therefore, sorry to ask a question very simple . When I write the very simple code: select sum(età) from dipendenti everything works fine and