Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-18 Thread Woody Wu
On Friday, 9 May 2014, RSmith <rsm...@rsweb.co.za> wrote: > > On 2014/05/08 18:16, Woody Wu wrote: > >> On 2014年5月8日 GMT+08:00PM11:59:33, RSmith <rsm...@rsweb.co.za> wrote: >> >>> On 2014/05/08 14:13, Woody Wu wrote: >>> >>>> Do

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-08 Thread Woody Wu
On 2014年5月8日 GMT+08:00PM11:59:33, RSmith <rsm...@rsweb.co.za> wrote: > >On 2014/05/08 14:13, Woody Wu wrote: >> >> Do you mean that my index for this case is already the best choice? >> >> And, as a general question, for a query in the form of >>sele

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-08 Thread Woody Wu
On 2014年5月8日 GMT+08:00PM11:59:33, RSmith <rsm...@rsweb.co.za> wrote: > >On 2014/05/08 14:13, Woody Wu wrote: >> >> Do you mean that my index for this case is already the best choice? >> >> And, as a general question, for a query in the form of >>sele

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-08 Thread Woody Wu
On 2014年5月8日 GMT+08:00PM9:14:52, Clemens Ladisch <clem...@ladisch.de> wrote: >Woody Wu wrote: >> On 2014年5月8日 GMT+08:00AM1:51:43, Clemens Ladisch <clem...@ladisch.de> >wrote: >>> Simon Slavin wrote: >>>> You can let SQLite make a better estimate by

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-08 Thread Woody Wu
On 2014年5月8日 GMT+08:00AM1:51:43, Clemens Ladisch <clem...@ladisch.de> wrote: >Simon Slavin wrote: >> On 7 May 2014, at 1:29pm, Woody Wu <narkewo...@gmail.com> wrote: >>> The 'explain query plan' gives same result for the first and the >second query: >>> &g

Re: [sqlite] Very slow when query max(col) on empty set?

2014-05-07 Thread Woody Wu
On 2014年5月7日 GMT+08:00AM3:16:35, Clemens Ladisch <clem...@ladisch.de> wrote: >Woody Wu wrote: >> The following query statement executed very slow, it took 15 secs on >my ARM device, >> >> 1. select max(time) from mytable where time < and id1 = k1 >and

[sqlite] Very slow when query max(col) on empty set?

2014-05-06 Thread Woody Wu
than 1 second on the same system. Also, I tried to replace the very large time value to a small enough one, 3. select max(time) from mytable where time < 0 and id1=k1 and id2=n This query also run very fast. Could anyone explain this to me? Thanks in advance.

Re: [sqlite] Mailing List

2014-05-04 Thread Woody Wu
qlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -Woody Wu ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Virtual Memory Size used looks too large

2014-02-19 Thread Woody Wu
On 20 February 2014 04:35, Clemens Ladisch <clem...@ladisch.de> wrote: > Woody Wu wrote: >> On 19 February 2014 23:09, Clemens Ladisch <clem...@ladisch.de> wrote: >>> Woody Wu wrote: >>>> sqlite is using mmap to map the database file? >> >>

Re: [sqlite] Virtual Memory Size used looks too large

2014-02-19 Thread Woody Wu
On 19 February 2014 23:09, Clemens Ladisch <clem...@ladisch.de> wrote: > Woody Wu wrote: >> I found my sqlite application presents a huge VSZ usage, 100+M in an >> ARM system, which has only 128M physical memory. Does this because >> sqlite is using mm

[sqlite] Virtual Memory Size used looks too large

2014-02-19 Thread Woody Wu
Hi, List I found my sqlite application presents a huge VSZ usage, 100+M in an ARM system, which has only 128M physical memory. Does this because sqlite is using mmap to map the database file? If this is the reason, how can I reduce the VSZ used? I checked my application with Valgrind, I think

[sqlite] How to disable the use of malloc()?

2014-02-19 Thread Woody Wu
Hi, I want to omits the Sqlite's internal invocation of malloc(3). What I tried were following, 1. Provide sqlite compile time options "-DSQLITE_ZERO_MALLOC -DSQLITE_ENABLE_MEMSYS5" 2. In the startup code of my application, call: sqlite3_config(SQLITE_CONFIG_HEAP, my_static_array, ...) Do you

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
was trying to update still locked by another process. This is normal, right? On 7 January 2014 19:32, Simon Slavin <slav...@bigfraud.org> wrote: > > On 7 Jan 2014, at 10:13am, Woody Wu <narkewo...@gmail.com> wrote: > > > Thanks for the clear guide. _busy_timeout is eas

Re: [sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Thanks for the clear guide. _busy_timeout is easier to use. By the way, i want confirm that if i am not in an explicit transaction, i can simply redo the _step() invoking, right? On Tuesday, 7 January 2014, Simon Slavin wrote: > > On 7 Jan 2014, at 8:50am, Woody Wu <narkewo...@

[sqlite] Do I really need rollback after sqlite3_step returns BUSY?

2014-01-07 Thread Woody Wu
Hi, The manual says that it should to rollback after sqlite3_step() returns SQLITE_BUSY as long as the current statment is in a transaction. Is this true? Why I cannot just sleep for a while and redo the sqlite3_step()? Thanks in advance. -- Life is the only flaw in an otherwise perfect

Re: [sqlite] Error 11 after doing a lot of simple insert/update operations!

2014-01-02 Thread Woody Wu
Kaminskiy wrote: > Woody Wu wrote: > > Hi, Simon > > > > I upload the source code onto my dropbox: > > https://www.dropbox.com/s/9shhshi0wn3e717/downloadfile.c Please have a > > look at it. > > > > The same test program run without a problem on my pc Li

Re: [sqlite] Error 11 after doing a lot of simple insert/update operations!

2014-01-01 Thread Woody Wu
Does anyone have a clue? BTW, happy new year :) On Tuesday, 31 December 2013, Woody Wu wrote: > Hi, Simon > > I upload the source code onto my dropbox: > https://www.dropbox.com/s/9shhshi0wn3e717/downloadfile.c Please have a > look at it. > > The same test program run wi

Re: [sqlite] Error 11 after doing a lot of simple insert/update operations!

2013-12-31 Thread Woody Wu
eabi compiler. With the same complier and the toolchain, I have been buit a whole target ARM system including kernel, 1000 open source applications, even including a tiny X window. On Tuesday, 31 December 2013, Simon Slavin wrote: > > On 31 Dec 2013, at 8:41am, Woody Wu <narkewo...@

[sqlite] Error 11 after doing a lot of simple insert/update operations!

2013-12-31 Thread Woody Wu
n my ode, then I can fixed. But if my code is okay, it's really a big probleme. If, otherwise, someone can confirm that this is a sqlite bug, can I have any work-around? Thanks in advance. -woody -- Life is the only flaw in an otherwise perfect nonexistence -- Schopenhauer

Re: [sqlite] Is that same between rebinding every parameter and

2013-12-30 Thread Woody Wu
Thanks, Igor. On Monday, 30 December 2013, Igor Tandetnik wrote: > On 12/30/2013 9:14 AM, narkewo...@gmail.com wrote: > >> If I don't call sqlite3_clear_binding but rebind every parameter with >> sqlite3_bind_type before every sqite3_step after sqlite3_reset, will it >> be any different? >> > >

Re: [sqlite] What number(2) means?

2013-07-10 Thread Woody Wu
. It's just a database created many years ago, probabaly sqlite supported that then. Thanks for your explaination. > On Wed, Jul 10, 2013 at 10:06 AM, Woody Wu <narkewo...@gmail.com> wrote: > > On Wed, Jul 10, 2013 at 09:53:41AM +0200, Paolo Bolzoni wrote: > >> See here: >

Re: [sqlite] What number(2) means?

2013-07-10 Thread Woody Wu
On Wed, Jul 10, 2013 at 09:53:41AM +0200, Paolo Bolzoni wrote: > See here: > http://www.sqlite.org/datatype3.html > > I think it just means Integer. And its > size depends on the magnitude of the > number stored. > I've read the doc, it's not so easy to understand. Did you mean, in number(N),

[sqlite] What number(2) means?

2013-07-10 Thread Woody Wu
I have an old dabase, some integer columns were defined as type of number(2). What does this mean in sqlite3? What's the data ragne it can represent, and how much bytes it will consume when stored? Thanks in advance. -- I can't go back to yesterday - because I was a different person then

[sqlite] Questions about exclusive transation

2013-06-25 Thread Woody Wu
'? Especially, is that possible that the 'commit' could get an error of SQLITE_BUSY? You know, the reason I want to use exclusive transaction is to simplify the programming. Thanks in advance. - woody ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Database Corrupted!

2013-05-28 Thread Woody Wu
On Tue, May 28, 2013 at 06:31:47AM -0500, Thanumalayan Sankaranarayana Pillai wrote: > Woody, this mailing list might not be the best place to discuss problems > with YAFFS2. Saying that, a simple test could be to almost fully fill the > YAFFS2 partition with a bunch of files, then r

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Tue, May 28, 2013 at 03:08:55AM +0100, Simon Slavin wrote: > > On 28 May 2013, at 2:37am, Woody Wu <narkewo...@gmail.com> wrote: > > > How do you guys think about this: if NAND has an > > IO problem, Yaffs2 should recover it or forward the error to > > a

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Mon, May 27, 2013 at 04:31:25PM +0100, Simon Slavin wrote: > > On 27 May 2013, at 4:22pm, Woody Wu <narkewo...@gmail.com> wrote: > > > If Yaffs2 is the cause, how can I write an effective test to exposure it? > > Do you have an opportunity to format the same

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Mon, May 27, 2013 at 10:59:25AM -0500, Thanumalayan Sankaranarayana Pillai wrote: > Hi Woody, > > If the log messages that you see are "chunk nnn not erased", it might > probably be an error between your NAND device and YAFFS2 (according to a > couple of Google

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Mon, May 27, 2013 at 11:33:08AM -0400, Richard Hipp wrote: > On Mon, May 27, 2013 at 11:22 AM, Woody Wu <narkewo...@gmail.com> wrote: > > > Richard, > > > > If Yaffs2 is the cause, how can I write an effective test to exposure it? > > > > Do you re

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Mon, May 27, 2013 at 04:31:25PM +0100, Simon Slavin wrote: > > On 27 May 2013, at 4:22pm, Woody Wu <narkewo...@gmail.com> wrote: > > > If Yaffs2 is the cause, how can I write an effective test to exposure it? > > Do you have an opportunity to format the same dr

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
if this is caused by sqlite or Yaffs2 itself, on the other hand, I also cannot prove this really means bad things since the program at that moment was still running fine. -woody On 27 May 2013 20:47, Richard Hipp <d...@sqlite.org> wrote: > On Mon, May 27, 2013 at 8:28 AM, Simon Sla

Re: [sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
On Mon, May 27, 2013 at 11:08:57AM +0800, Woody Wu wrote: > Hi, List > > Probably this is another case of database corrupted. I read the > documents about this topic and think I did not make same mistakes > described in that 'how to corrupt ...' documentation. > > I have a t

[sqlite] Database Corrupted!

2013-05-27 Thread Woody Wu
med - Please have a look at my attached code and be kindly give me a clue on what are possible causes? Thanks in advance. -- woody I can't go back to yesterday - because I was a different person then. #define _GNU_SOURCE #include #include #include #incl

Re: [sqlite] Understanding Foreign Key Contraints

2012-07-09 Thread Woody
Alan i think a better approach might be to have triggers on yor tables to control what gets deleted when. Woody Wizard, at large "I'm in shape, round is a shape!"   --- On Sat, 7/7/12, Alan Chandler <a...@chandlerfamily.org.uk> wrote: From: Alan Chandler <a...@ch

Re: [sqlite] [bug] inconsistency between #define compilte-time and isNT() run-time

2012-03-16 Thread Woody
Woody "Im in shape, round is a shape!" Original message Subject: [sqlite] [bug] inconsistency between #define compilte-time and isNT() run-time From: AlexHr <al...@free.fr> To: sqlite-users@sqlite.org CC: Hello, I've just upgraded SQLite fro

Re: [sqlite] Fast JOIN

2011-10-18 Thread Woody
you will need an inner select that selects everything and orders that, then an outside select that pages from the inner select. Woody Wizard, at large "I'm in shape, round is a shape!"   --- On Tue, 10/18/11, Fabian <fabianpi...@gmail.com> wrote: From: Fabian <fa

Re: [sqlite] Can I dynamically select a table ?

2011-05-11 Thread Woody & Yuni Ho
It won't work due to syntax. Try putting a select statement as the when part of the case statement. Woody wizard at large(I'm in shape. Round is a shape) Connected by MOTOBLUR™ on T-Mobile -Original message- From: John <tauru...@gmail.com> To: General Discussion of SQLite Da

Re: [sqlite] Determining how many columns were returned in a query

2011-05-08 Thread Woody
the number of columns, loop thru that to get the header names, and data types for output masking, then just loop thru each row till its done.   The actual report handler code stays pretty simple, most of the actual report processing is done by sqllite.   Woody Wizard, at large "I'm in

Re: [sqlite] sqlite3_step to select and update the same table

2010-11-08 Thread Woody & Yuni Ho
Sql can do it. It just takes a properly designed query. Woody wizard at large(I'm in shape. Round is a shape) Connected by MOTOBLUR™ on T-Mobile -Original message- From: cricketfan <srtedul...@yahoo.co.in> To: sqlite-users@sqlite.org Sent: Mon, Nov 8, 2010 19:24:54 PST Subje

Re: [sqlite] In memory database and locking.

2010-09-08 Thread Woody & Yuni Ho
Have you tried issueing a vacum after n deletes? Woody wizard at large(I'm in shape. Round is a shape) Connected by MOTOBLUR™ on T-Mobile -Original message- From: Hemant Shah <hj...@yahoo.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Wed, Se

Re: [sqlite] Removing duplicate entries from a database

2010-07-15 Thread Woody & Yuni Ho
Uhh its cool but been around for over a decade at least. Sorry Woody wizard at large(I'm in shape. Round is a shape) Connected by MOTOBLUR™ on T-Mobile -Original message- From: "Ted Rolle Jr." <ster...@gmail.com> To: SQLite Database <sqlite-users@sqlite.org> Sent

Re: [sqlite] Using SQLite in embedded environment

2008-06-28 Thread Steven Woody
On Sat, Jun 28, 2008 at 8:37 PM, dcharno <[EMAIL PROTECTED]> wrote: > Steven Woody wrote: >> On Sat, Jun 28, 2008 at 11:30 AM, dcharno <[EMAIL PROTECTED]> wrote: >>>> As an option, we also think about Berkeley DB, do you experts has >>>> experie

Re: [sqlite] Using SQLite in embedded environment

2008-06-28 Thread Steven Woody
On Sat, Jun 28, 2008 at 11:30 AM, dcharno <[EMAIL PROTECTED]> wrote: >> As an option, we also think about Berkeley DB, do you experts has >> experience using Berkeley DB on ARM/Linux with ulibc or glibc? > > Berkeley DB may also be an option. It really depends upon what you are > trying to

Re: [sqlite] Using SQLite in embedded environment

2008-06-27 Thread Steven Woody
2008/6/28 dcharno <[EMAIL PROTECTED]>: >> I am considering to use SQLite in my current embedded application >> project. It's a ARM9/Linux. Do you experts think it is a good idea? >> And, is there any tips or considerations in this combination? > > Currently using SQLite on an ARM7 running

Re: [sqlite] Using SQLite in embedded environment

2008-06-27 Thread Steven Woody
2008/6/26 Alex Katebi <[EMAIL PROTECTED]>: > Steven, > > If SQLite runs on ARM9/Linux, then I don't see any problems. I think you > should watch the SQLite video on youtube. > http://www.youtube.com/watch?v=giAMt8Tj-84 Thank you. I will go youtube > > Enjoy! > -A

[sqlite] Using SQLite in embedded environment

2008-06-24 Thread Steven Woody
Hi, I am considering to use SQLite in my current embedded application project. It's a ARM9/Linux. Do you experts think it is a good idea? And, is there any tips or considerations in this combination? Thank you. ___ sqlite-users mailing list