Re: [sqlite] Table within a table??

2009-10-31 Thread Jay A. Kreibich
On Sat, Oct 31, 2009 at 01:13:31AM -0400, mark m scratched on the wall: > O.K. I think I am starting to get the idea. It is just so foreign for me > to organize things this way. A master work history table for all cases > almost seems confusing. It will just take a bit of adjustment for me >

Re: [sqlite] How to decide which table is the outer table and which table is the inner table?

2009-10-31 Thread Kristoffer Danielsson
All I know is that SQLite chooses the wrong order when I give it my query at this form: SELECT COUNT(A_ID) FROM (A) NATURAL JOIN (B NATURAL JOIN C NATURAL JOIN D); Where: A = 50,000 rows. B = 2 rows. C = 10,000 rows D = 250,000 rows (B + C + D) have two columns that are

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Dair Grant
chen jia wrote: > Before I ran vacuum, I ran pragma integrity_check; and got > sqlite> pragma integrity_check; > ok > > After I ran vacuum, I ran pragma integrity_check; again and got > sqlite> pragma integrity_check; > *** in database main *** > On tree page 15 cell 36: Child page depth differs

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Simon Slavin
On 31 Oct 2009, at 9:39pm, chen jia wrote: > I have not updated sqlite from version 3.6.10 to version 3.6.12 yet. 3.6.10 was January 2009. 9 months ago. Perhaps there's an easy way to get a later version. > But, I have tried .dump by following the instructions on >

Re: [sqlite] How to make LIKE searches case-sensitive

2009-10-31 Thread Ted Rolle
On Sat, 31 Oct 2009 18:43:46 +0100 Sylvain Pointeau wrote: > http://www.sqlite.org/pragma.html#pragma_case_sensitive_like Thanks, Sylvain! I'm more impressed with SQLite every day. Ted ___ sqlite-users mailing list

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread Simon Slavin
On 31 Oct 2009, at 7:03pm, chen jia wrote: > Before I ran vacuum, I ran pragma integrity_check; and got > sqlite> pragma integrity_check; > ok > > After I ran vacuum, I ran pragma integrity_check; again and got > sqlite> pragma integrity_check; > *** in database main *** > On tree page 15 cell

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread chen jia
> Please enter this line in the same sqlite3 tool you are using for > vacuum: > PRAGMA integrity_check; > It appears that you have a copy of the database from before the > 'vacuum' command. If you can, take another copy and run the PRAGMA > command both before and after the 'vacuum'. For more

Re: [sqlite] A constraint bug?

2009-10-31 Thread Jeremy Hinegardner
On Sat, Oct 31, 2009 at 08:31:01AM -0400, D. Richard Hipp wrote: > > On Oct 30, 2009, at 10:25 PM, Mick wrote: > > > This is more FYI than needing it (as I have already worked around > > it), but I > > have discovered that an IGNORE constraint on an insert, when one of > > the > > fields in

Re: [sqlite] Data loss after vacuum

2009-10-31 Thread chen jia
> Please enter this line in the same sqlite3 tool you are using for > vacuum: > PRAGMA integrity_check; > It appears that you have a copy of the database from before the > 'vacuum' command. If you can, take another copy and run the PRAGMA > command both before and after the 'vacuum'. For more

Re: [sqlite] How to make LIKE searches case-sensitive

2009-10-31 Thread Sylvain Pointeau
http://www.sqlite.org/pragma.html#pragma_case_sensitive_like On Sat, Oct 31, 2009 at 4:27 PM, P Kishor wrote: > On Sat, Oct 31, 2009 at 10:21 AM, Ted Rolle wrote: > > I'd like to make LIKE '%Blah%/ only find 'Blah', and not 'blah'. > > >

Re: [sqlite] BUG: datatypes conversion logic error

2009-10-31 Thread Alexey Pechnikov
Hello! On Saturday 31 October 2009 18:55:58 Pavel Ivanov wrote: > > And so text '1' in view_test is not equal to text '1' in view_test2. Are > > you sure > > that current datatypes realisation is right? > > Are you sure that when you compare column in view to something it is > not optimized to

Re: [sqlite] has used anyone sqlite for production web sites ??

2009-10-31 Thread Alexey Pechnikov
Hello! Add SQLite database to your current site and write to it too. You will see how this work on you environment. About your site load. 60/80 Concurrent users with common query time about 50 ms produce 1200/1600 requests per second. "10 concurrent writers" with "4/7 Insert or Update per

Re: [sqlite] BUG: datatypes conversion logic error

2009-10-31 Thread Pavel Ivanov
> And so text '1' in view_test is not equal to text '1' in view_test2. Are you > sure > that current datatypes realisation is right? Are you sure that when you compare column in view to something it is not optimized to get value from table and compare it? In this case your results are

Re: [sqlite] How to make LIKE searches case-sensitive

2009-10-31 Thread P Kishor
On Sat, Oct 31, 2009 at 10:21 AM, Ted Rolle wrote: > I'd like to make LIKE '%Blah%/ only find 'Blah', and not 'blah'. http://www.sqlite.org/lang_expr.html#glob -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source

[sqlite] How to make LIKE searches case-sensitive

2009-10-31 Thread Ted Rolle
I'd like to make LIKE '%Blah%/ only find 'Blah', and not 'blah'. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] BUG: datatypes conversion logic error

2009-10-31 Thread Alexey Pechnikov
Hello! $ sqlite3 SQLite version 3.6.19 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table test(a blob); sqlite> insert into test values(1); sqlite> insert into test values('1'); sqlite> create view view_test as select a||'' as a from test; sqlite>

Re: [sqlite] BUG: datatypes conversion logic error

2009-10-31 Thread Pavel Ivanov
> As you can see above 1 is always equal to '1'. You're wrong. As you can see from your own examples when you store 1 or '1' in the field a of type "text" then comparison of field a to either 1 or '1' is always true. And at the same time comparison of constant 1 to constant '1' is always false.

Re: [sqlite] A constraint bug?

2009-10-31 Thread D. Richard Hipp
On Oct 30, 2009, at 10:25 PM, Mick wrote: > This is more FYI than needing it (as I have already worked around > it), but I > have discovered that an IGNORE constraint on an insert, when one of > the > fields in the constraint is NULL, will insert a duplicate record > into the > database.

Re: [sqlite] A constraint bug?

2009-10-31 Thread Simon Davies
2009/10/31 Mick : > This is more FYI than needing it (as I have already worked around it), but I > have discovered that an IGNORE constraint on an insert, when one of the > fields in the constraint is NULL, will insert a duplicate record into the > database. > > i.e. > > CREATE

[sqlite] A constraint bug?

2009-10-31 Thread Mick
This is more FYI than needing it (as I have already worked around it), but I have discovered that an IGNORE constraint on an insert, when one of the fields in the constraint is NULL, will insert a duplicate record into the database. i.e. CREATE TABLE mytable ( ID1 INTEGER NOT NULL, ID2

Re: [sqlite] SQLite on a Windows Network

2009-10-31 Thread Dave Dyer
>I have heard problems with SQLite and NFS but I have no idea if a standard >Windows shared drive uses NFS or not. Am I o.k. to use SQLite??? It's ok for low intensity uses. You'll get "database locked" errors if there is too much contention for the database.

Re: [sqlite] BUG: datatypes conversion logic error

2009-10-31 Thread Alexey Pechnikov
Hello! On Saturday 31 October 2009 02:31:44 Simon Slavin wrote: > > On 30 Oct 2009, at 9:47pm, Alexey Pechnikov wrote: > > > Now SQLite think that 1 is equal to '1' in some causes and think > > different in other. > > Just like every other language, once you get into it you have to learn >