[sqlite] Saving an in-memory database to file

2007-07-24 Thread Colin Manning
Hi If I create an in-memory database (by opening with ":memory:"), then add tables etc to it, is it possible to then write it to a disk file so it can subsequently be used as a file-based db? Thanks -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.476 / Virus Datab

[sqlite] optimizer question

2007-07-19 Thread Colin Manning
Hi If I have a table with a couple of indexed varchar fields e.g: CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); CREATE INDEX ia ON t(a); CREATE INDEX ib ON t(b); then will the sqlite query optimizer use these indices in these SELECT's: 1. SELECT * FROM t WHERE a LIKE 'M%'; 2. SELEC

[sqlite] optimizer question

2007-07-19 Thread Colin Manning
Hi If I have a table with a couple of indexed varchar fields e.g: CREATE TABLE t (id INT, a VARCHAR(20), b VARCHAR(20)...); CREATE INDEX ia ON t(a); CREATE INDEX ib ON t(b); then will the sqlite query optimizer use these indices in these SELECT's: 1. SELECT * FROM t WHERE a LIKE 'M%'; 2. SELEC

Re: [sqlite] Re: Finding record position

2007-07-17 Thread Colin Manning
select count(*) from pb where name < 'John Smith'; Thx... duh guess I should have thought of that. -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.476 / Virus Database: 269.10.6/902 - Release Date: 15/07/2007 14:21

[sqlite] Finding record position

2007-07-17 Thread Colin Manning
Hi Assume I have a simple table for a phone directory - names, addresses, and phone numbers etc. Then assume this is a vast table with many millions of records, and that there are indices on name, phone number, etc. Then assume I'm writing an app that displays the entire directory in a win