Re: [sqlite] Questions about "analyze"

2008-10-17 Thread Paul Smith
Clodo wrote: > Many thanks, it's a good news that resolve my problem. > > But still remain "a trick", i think the behaviour descripted in my > original feedback is "strange".. i understand, if all fields have the > same value, an index on that have a zero "height" in computing the best >

Re: [sqlite] Listing duplicate entries

2008-04-28 Thread Paul Smith
flakpit wrote: > Is there a way of querying the database to list all duplicate entries from a > column in the same table? > > Something like "SELECT * FROM mytable WHERE last NOT UNIQUE" > > fred, johnson > roger, johnson > > An unoptimised 'off the top of my head' solution would be: select *

Re: [sqlite] delete rows but the database files still have the big size

2008-04-15 Thread Paul Smith
Joanne Pham wrote: > Do I miss some commands here? I thought the database file size shoud get much > smaller after the delete operation but it isn't. > Can you please help to let me know how to get the database file szie smaller. > I have tried "VACUUM" but the file's size didn't change. >

Re: [sqlite] How to manage separate lists of ordered items?

2008-04-14 Thread Paul Smith
[EMAIL PROTECTED] wrote: > If I have something like a real estate database where each customer > can have an ordered list of houses they want to visit, is there a > recommended way to design tables that just link to other tables to > create the ordered list? I have a table of houses and a table of

Re: [sqlite] Rowid After Sorting

2008-03-17 Thread Paul Smith
> >But I need my rowid to be chaged as follows. > >Rowid Id Name >1 4 aaa >2 3 bbb >3 2 xxx >4 1 zzz You can't. Rowid isn't an index of where the row appeared in the results, it's a 'hidden' field in each row in the

Re: [sqlite] which is faster, PHP or SQLite?

2008-02-18 Thread Paul Smith
al scan to get the result, it can be quicker to do, say, two indexed scans in SQLite and then operate on the two result sets (eg doing a union or intersect) to produce the final result set, but this is the exception rather than the rule (for us anyway). Paul Smith _

Re: [sqlite] Is this a valid syntax

2007-04-17 Thread Paul Smith
At 16:45 17/04/2007, Stef Mientki wrote: I don't understand this behaviour, is this too complex ? or am I doing something wrong ? I use the following syntax, and I get 7 records back, (which is not correct in my opinion) SELECT PO.* FROM Koppel LEFT JOIN PO WHERE (Koppel.K_App == PO.App)

Re: [sqlite] Optimize a query

2007-04-17 Thread Paul Smith
At 16:46 17/04/2007, you wrote: This is news to me. Why can't SQlite use more than one index? Possibly because it's 'SQ *Lite*'? The query optimiser in SQLite is a lot less powerful than in some other SQL databases - but then it's a fraction of the size as well... Instead of having two

Re: [sqlite] Can anyone recommend some ISAM db to me?

2006-10-09 Thread Paul Smith
At 11:38 08/10/2006, you wrote: Hi, all After trying SQLite on my embedded platform, I feel that it's a little too complicated and time-consuming to my platform, especially the parsing. So, could someone recommend several ISAM ones to me?(I'm a newbie of database*^_^*) You could have a look

Re: [sqlite] Best way to compare two databases

2006-09-04 Thread Paul Smith
At 16:48 04/09/2006, you wrote: Hi all: I have developed a program that uses a sqlite database. Until now the users downloaded an entire new version of the database weekly from the FTP server. But now the database is too big (about 500.000 records) and i want to make a database

Re: [sqlite] Index usage

2006-06-20 Thread Paul Smith
At 14:25 20/06/2006, Mikey C wrote: Hi, I just wanted to ask for confirmation that my understanding on how the query optimiser works is correct. SQLite only uses one index for each table in a FROM? Yes What if tables are joined? Does an index get used for each joined table? No, just

Re: [sqlite] speed of ORDER BY clause?

2006-06-14 Thread Paul Smith
At 16:56 14/06/2006, [EMAIL PROTECTED] wrote: I'm finding that ORDER BY is surprisingly slow, and it makes me wonder if I'm doing something wrong. Here's the situation: I need to select a large set of records out of a table, sort them by one column, and then get just a subset of the sorted

RE: [sqlite] How dangerous is PRAGMA Synchronous OFF?

2005-11-17 Thread Paul Smith
At 00:54 17/11/2005, Preston Z wrote: If the power never goes out and no programs ever crash on you system then Synchronous = OFF is for you, but the rest of the world might still want it ON. Really it sounds like the thing you need to worry about most is the unexpected termination of your

Re: [sqlite] Multi-threading.

2005-07-27 Thread Paul Smith
At 03:21 27/07/2005, Mrs. Brisby wrote: On Mon, 2005-07-25 at 09:48 -0500, Jay Sprenkle wrote: > The theory has been proposed that threads aren't better than separate > processes, or application implemented context switching. Does anyone > have an experiment that will prove the point either way?

RE: [sqlite] Insert all rows from old table into new table but in sorted order

2005-06-30 Thread Paul Smith
, and do 'order by no desc' in all your queries requiring that ordering. You'll be glad you did it that way in the future! -Original Message- From: Paul Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, June 30, 2005 4:53 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Insert all

Re: [sqlite] Insert all rows from old table into new table but in sorted order

2005-06-30 Thread Paul Smith
I can insert all rows of existing table into new table having same columns using query : Insert into NEWTABLE select * from OLDTABLE But I want all rows of NEWTABLE sorted by field No, So I used query Insert into NEWTABLE select * from OLDTABLE order by no desc But it is not giving me

Re: [sqlite] download db - security question

2005-01-24 Thread Paul Smith
At 06:54 24/01/2005, you wrote: I was wondering if someone can just download off my webpage the sqlite database. And if they can is there a way to block this type of download throw apache? Don't put the SQLite database in an apache web site directory.. This is easily done if you run your own web

[sqlite] Is it possible to 'fix' a malformed database

2004-10-11 Thread Paul Smith
If I do pragma integrity_check on a database I get: *** in database main *** On page 8 cell 0: invalid page number 1581 On page 8 at right child: invalid page number 1582 On page 7 cell 0: invalid page number 593 On page 7 cell 1: invalid page number 594 On page 7 cell 2: invalid page number 1171

Re: [sqlite] Apostrophes in strings

2004-08-07 Thread Paul Smith
Apply the php-function "sqlite_escape_string" on all the string data you insert/update to the database. That should to the trick. Thanks, it just makes a '' from ' instead of \' as with MySQL. Reminds me a bit of Visual Basic... It's the standard SQL way of escaping a ' character (MySQL (and

Re: [sqlite] Problems adding a new column

2004-05-26 Thread Paul Smith
At 14:03 26/05/2004, Tito Ciuro wrote: Hello, I would like to add a new column to an existing table on-the-fly. I've followed the code found on SQLite's website: http://sqlite.org/faq.html#q13 and modified it slightly to the following: Adding table 'address' to the database... -> CREATE

Re: [sqlite] vers 3.0 concurrency issues

2004-05-07 Thread Paul Smith
At 17:22 06/05/2004, D. Richard Hipp wrote: Thomas, Basil wrote: > I am no technical expert but...could not page locking at least be implemented > by the pager module to increase concurrency(very naive...but better than file > locking). > Page-level locking will not help. For one thing, we

[sqlite] Ticket 575

2004-04-14 Thread Paul Smith
Is there any progress on this ticket (temporary file storage method problem)? If not, can anyone suggest any workarounds? I've just discovered here that it looks like we're getting really bad performance hits on a Windows machine with temporary files when people use certain virus scanners.

[sqlite] SQLite version 3.0

2004-04-08 Thread Paul Smith
I've looked at the proposed changes for SQLite V3, and, whilst it all looks reasonable, it does absolutely nothing for me... The things I'd like would be more at the 'lower' levels of the database. I'd like to see the query engine be able to use multiple indices if appropriate, rather than

Re: [sqlite] Command-line SQLite

2003-11-28 Thread Paul Smith
At 15:20 28/11/2003, [EMAIL PROTECTED] wrote: I'm attempting to use the command-line SQLite to test the speed of certain "selects" and how writing them in different fashions affects speed OK, can anyone explain (no pun intended!) what I should be looking for in what information "explain"

Re: [sqlite] Concurrency in SQLite

2003-11-24 Thread Paul Smith
At 16:21 24/11/2003, Doug Currie wrote: It looks to me that several users are (a) in a uniprocess environment, and (b) inventing their own SQLite db access synchronization code. An SQLite fine grained lock manager for threads in a single process would address these same issues, with better

Re: [sqlite] Improving concurrency in SQLite

2003-11-23 Thread Paul Smith
Looking at the feedback paper, I wonder whether, possibly, things are being made more complicated than necessary. In most (if not all) of the situations I've seen people mention where concurrency is a problem (and in our own similar situation), it looks as if the problem is all in 'single

Re: [sqlite] Where statements are they case sensitive?

2003-10-29 Thread Paul Smith
I just checked something and noticed that the WHERE statement is case sensitive. I have check this in SQL Server and it is not case sensitive. I am using 2.8.5 and 2.8.6. As an example in the northwind DB I have for SQLite . There is a table called Orders select * from sqlite_master where