Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Stephen Woodbridge
Itzchak Raiskin wrote: > Hi > I want to use SQLite in a GIS application where I create a database > containing terrain data (coordinates, height). > I would like to query this database with start and end points of a line and > get a vector with all heights point along this line. > I can, of course

Re: [sqlite] Db design question (so. like a tree)

2009-06-05 Thread Stephen Woodbridge
Here is a relational model that I use for my genealogy. It is in postgresql, but it should work fine in SQLite: All people are stored in the indi table: CREATE TABLE woodbridge.indi ( indi character varying(10) NOT NULL, lname character varying(30), fname character varying(60),

Re: [sqlite] rtree insert performance

2008-12-04 Thread Stephen Woodbridge
Oyvind Idland wrote: > Thanks for responses :) > > Whereby "objects" you mean "rows," no? You are getting upward of 5500 >> sustained inserts per second. That sounds pretty good. That said, are >> you using transactions? See what difference that makes. >> > > Yep, I meant rows. Inserting rows in

Re: [sqlite] rtree insert performance

2008-12-03 Thread Stephen Woodbridge
Oyvind Idland wrote: > Hi, > > I am fiddling around with the r-tree module a bit, which works great and > gives the effect I am looking for. > > The only thing is that I wish I could speed up inserts. Populating the > rtree-index with 1 million objects > takes about 180 seconds (using prepared

Re: [sqlite] Adding index to table makes SELECT much slower. Why?

2008-10-08 Thread Stephen Woodbridge
James, I'm not sure I can answer your questions about speed issues other than to suggest the you read up on the rtree index which is designed for this type of query and should be extremely fast. -Steve James Pringle wrote: > Hi- > > I am new to sqlite, and am having a puzzling problem. I

Re: [sqlite] how to connect to existing db with sqlite3.exe

2008-09-30 Thread Stephen Woodbridge
I think that the problem is with your understanding of what the .databases command does. I could be mistaken, but I thought is only listed attached databases. It is not a command to search for possible databases that may exist on your file system. So when you use the command: sqlite3 foo.db

Re: [sqlite] seeking storage design assistance

2008-09-30 Thread Stephen Woodbridge
It also helps to know how you want to access/manipulate your data and what you want to do with it in SQL versus with your application. For instance, you could just store all the cad data as a blob, along with the attributes in columns. Then you can fetch the data based on attributes, and

Re: [sqlite] Performance/bug in multikey 'group by' in 3.6.2

2008-09-21 Thread Stephen Woodbridge
D. Richard Hipp wrote: > On Sep 21, 2008, at 8:51 AM, Russ Leighton wrote: > >> I am interested in ... a way >> to constraint/control index selection on queries. >> > > What other SQL database engines have this capability and what syntax > do they use? Richard, Hope this are useful: Oracle:

Re: [sqlite] Virtual tables

2008-09-13 Thread Stephen Woodbridge
Kishor, I think Marco may want to be able to know how to determine which tables in a DB are real tables and which ones below to virtual tables. If you want to do something like dump tables from the database, you do not want to be dumping all the internally generated real tables. It might be

Re: [sqlite] Proposed removal of (mis-)feature

2008-08-07 Thread Stephen Woodbridge
I'm +1 on this change. While I have not run into it as a feature or mis-feature, I would concur that it is ambiguous and problematic. A simple clear syntax benefits everyone. BTW, Thanks for all you effort to produce this wonder software. Best regards, -Steve W D. Richard Hipp wrote: >

Re: [sqlite] Loading a existing database 100% into memory

2008-08-06 Thread Stephen Woodbridge
Stephen Oberholtzer wrote: > On Wed, Aug 6, 2008 at 6:26 PM, Brown, Daniel <[EMAIL PROTECTED]> wrote: > >> Good afternoon list, >> >> I would like to load my current database file completely into memory, >> mostly as an experiment to check SQLite's maximum memory footprint, >> however searching

Re: [sqlite] Creating Indexes

2008-08-05 Thread Stephen Woodbridge
Jeffrey Becker wrote: > I have a table 'SiteMap' defined as : > > Create Table SiteMap > ( > NodeID blob not null PRIMARY KEY, > Title text NOT NULL UNIQUE, > Url text NOT NULL > ); > > I'd like to index on the node's parent value as defined by the > expression

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Stephen Woodbridge
csabi81 wrote: > Hi everyone > > I want to clone a database: copy all data from original database to the > destination database with a condition, so not all the entries need to be > copied. I have tried the following: > Obtain SQL from mastertable and create the tables in the new database, and >

Re: [sqlite] Does sqlite support stored procedure?

2008-07-29 Thread Stephen Woodbridge
John Stanton wrote: > Adding Javascript to Sqlite as a stored procedure language was a fairly > simple operation. Try it if you need stored procedures. This sounds really interesting. How to you make access to the sqlite3 api in javascript? Would you need to? Seems like you would need to at

Re: [sqlite] db vs shell

2008-07-29 Thread Stephen Woodbridge
I'm seeing a similar speed different with the 3X performance difference: [EMAIL PROTECTED]:~/work$ true && ( set -x > sqlite3 sample.db 'create table bar (foo text)' > seq -w 1 200 | sed 's/^/id/' > list.txt > sqlite3 sample.db '.imp "list.txt" "bar"' > time -p sqlite3 sample.db 'select

Re: [sqlite] FTS statistics and stemming

2008-07-28 Thread Stephen Woodbridge
Scott Hess wrote: > On Sat, Jul 26, 2008 at 1:28 PM, Stephen Woodbridge > <[EMAIL PROTECTED]> wrote: >> Alexey Pechnikov wrote: >>> I'm know that ispell, myspell, hunspell and trigrams are used in PostgreSQL >>> FTS. A lot of languages are support

Re: [sqlite] FTS statistics and stemming

2008-07-26 Thread Stephen Woodbridge
Alexey Pechnikov wrote: > Hello! > > В сообщении от Saturday 26 July 2008 21:37:19 Stephen Woodbridge написал(а): >> I have thought a lot about these issues and would appreciate any >> thoughts or ideas on how to implement any of these concepts or others >> for f

Re: [sqlite] FTS statistics and stemming

2008-07-26 Thread Stephen Woodbridge
Alexey Pechnikov wrote: > Hello! > > And how about stemming? Can I'm using ispell, myspell, hunspell? And trigrams? Hello Alexey, There are currently two stemmers available: simple - which just breaks the input into tokens based on spaces and punctuation that is first converted to spaces.

Re: [sqlite] Severe documentation bug in sqlite3_close leading to crash

2008-07-26 Thread Stephen Woodbridge
Hartwig Wiesmann wrote: > The latest sqlite3_close(sqlite3*) documentation states: > > Applications should finalize all prepared statements and close all > BLOB handles associated with the sqlite3 object prior to attempting to > close the object. The sqlite3_next_stmt() interface can be used

Re: [sqlite] FTS statistics and stemming

2008-07-25 Thread Stephen Woodbridge
tines, but I do not think this is a time critical step in the first place. You debug routines do provide some additional information that my approach does not provide. I will definitely give your code a try. Thanks, -Steve > On Sat, Jul 5, 2008 at 9:30 PM, Stephen Woodbridge > <[EM

Re: [sqlite] Ultimate noob question: What do I do to reference another table?

2008-07-18 Thread Stephen Woodbridge
LMcLain wrote: > Thanks for the replay Igor! > > I would heartily agree about getting a textbook. Do you have one that you > could recommend? I like "The definitive Guide to SQLite" by Michael Owens, it is excellent, except the index which sucks. It is a very good read and covers a lot of the

Re: [sqlite] Does changing the db change result sets?

2008-07-17 Thread Stephen Woodbridge
Igor Tandetnik wrote: > "Nikolaus Rath" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] >> What happens if >> >> 1. I prepare and execute a select statement >> 2. I retrieve a couple of rows >> 3. I execute a new query that would change the result of the >>query in 1 > > On the

[sqlite] [Fwd: FTS statistics and stemming]

2008-07-15 Thread Stephen Woodbridge
, offset, ...], [doc_id, offset, ...], ... is this correct? where is this stored? Best regards, -Stephen Woodbridge Original Message Subject: [sqlite] FTS statistics and stemming Date: Sat, 05 Jul 2008 23:30:55 -0500 From: Stephen Woodbridge <[EMAIL PROTECTED]> Reply-To: G

Re: [sqlite] partial search matches using FTS

2008-07-13 Thread Stephen Woodbridge
Rael Bauer wrote: > Hi, > > Is it possible to obtain partial matches to a search term using the fts > search? > > E.g. field data contains: apple > Search term: app > will return a match (optionally with match info). > > If not, please add this as a feature request :). MATCH 'app*' should

Re: [sqlite] patch to allow integer rtree keys

2008-07-12 Thread Stephen Woodbridge
Dan wrote: > On Jul 12, 2008, at 2:42 AM, Steve Friedman wrote: > >> >> Filip Navara wrote: >>> how about actually attaching the patch? :) >>> >>> - Filip >>> >>> On Fri, Jul 11, 2008 at 9:23 PM, Steve Friedman >>> <[EMAIL PROTECTED]> wrote: I've just started using the rtree extension, and

Re: [sqlite] Fuzzy Matching

2008-07-06 Thread Stephen Woodbridge
y awesome in reducing > over/under matches. > > Woody > > --- On Sat, 7/5/08, Stephen Woodbridge <[EMAIL PROTECTED]> > wrote: > > From: Stephen Woodbridge <[EMAIL PROTECTED]> Subject: Re: > [sqlite] Fuzzy Matching To: "General Discussion of SQLite Databas

Re: [sqlite] Fuzzy Matching

2008-07-05 Thread Stephen Woodbridge
Stephen Woodbridge wrote: > I would be interested in having something like this also. > > What I don't understand in your approach is how you compute the > (Levenstein) distance during a search. It seems like you have a fixed > set of tokens from your document text and th

Re: [sqlite] Fuzzy Matching

2008-07-05 Thread Stephen Woodbridge
I would be interested in having something like this also. What I don't understand in your approach is how you compute the (Levenstein) distance during a search. It seems like you have a fixed set of tokens from your document text and these are indexed. Then you have a query token the you want

Re: [sqlite] Spatial data in SQLite

2008-07-03 Thread Stephen Woodbridge
Alexey Pechnikov wrote: > Hello! > > I found article about spatial extensions for SQLite > http://www.perrygeo.net/wordpress/?p=115 > > Do you know other GIS extensions? I'm migrating from PostgreSQL+PostGIS to > SQLite and searching GIS extensions for SQLIte.

Re: [sqlite] counting tables

2008-07-03 Thread Stephen Woodbridge
Tim Streater wrote: > Hi, > > I have a PHP script that I run in Terminal under OS X, which opens an sqlite > db and works on it. Trouble is, if the db doesn't exist then the PHP library > silently creates an empty db with the given name. Given this, I need to > detect that the empty db has >

Re: [sqlite] Building ft3?

2008-07-02 Thread Stephen Woodbridge
Stephen Woodbridge wrote: > Hi all, > > I'm on Linux and I would like to build sqlite3 with rtree and ft3 > support. How do I do that? I have read through the docs, website, the > wiki and have evidently missed the needed page(s). > > For example: > http://www.sqlite.

[sqlite] Building ft3?

2008-07-02 Thread Stephen Woodbridge
Hi all, I'm on Linux and I would like to build sqlite3 with rtree and ft3 support. How do I do that? I have read through the docs, website, the wiki and have evidently missed the needed page(s). For example: http://www.sqlite.org/compile.html talks about compilation options but does not say

Re: [sqlite] SQLite and updating VIEWs

2008-07-01 Thread Stephen Woodbridge
Shawn Wilsher wrote: > Hey all, > > I'm working with a partitioned table setup with a permanent table and > a temp table with the same columns and indexes. Every X time we dump > all the records in the temp table over to the permanent one. In order > to make selection queries easier to manage,

Re: [sqlite] prepackaged sql statement

2008-07-01 Thread Stephen Woodbridge
Alex Katebi wrote: > The problem with the view is that you can not pass a parameter or variable > from the outer select to the views select. Right that is not the purpose of a view. Think of a view as a virtual TABLE. You can not pass a parameter to a table either. You can just query the table

Re: [sqlite] How does the database file grow?

2008-07-01 Thread Stephen Woodbridge
D. Richard Hipp wrote: > On Jul 1, 2008, at 11:03 AM, Martin.Engelschalk wrote: > >> Hi all, >> >> i create and fill database files which reach quite a large size >> after a >> while, because i only add data and never remove it. >> The database files themselves become quite fragmented on the

[sqlite] DROP TABLE IF EXISTS foo does not seem to work via the C-API

2008-06-29 Thread Stephen Woodbridge
Hi all, DROP TABLE IF EXISTS foo; does not seem to work via the C-API. If I type it in sqlite3 it works fine. When I tried via the C-API, I got the following: SQL: drop table if exists addr; SQL error: near "exists": syntax error My code is: strcpy(sql, "drop table if exists ");

Re: [sqlite] SQL questions

2008-06-27 Thread Stephen Woodbridge
c.panel wrote: > Oh yes! "set" is the solution. > I know that I have missed something... > thanks a lot. > > no possibilities for indexing on an expression : is it a particularity of > SQL or SQLite ? postgresql provides function based indexes. ___

Re: [sqlite] selecting an indexed table

2008-06-25 Thread Stephen Woodbridge
Alex Katebi wrote: > I have no way of knowing which rows a select command has visited for an > indexed table. > > create table t(a); > create index it on t(a); > insert ... > select * from t where a=5; > > Is there a select hook for debugging? How about: explain select * from t where a=5;

[sqlite] SQLite with client/server support

2008-06-19 Thread Stephen Woodbridge
This looks interesting: http://sqlitedbms.sourceforge.net/index.htm Alexey would this work for your multi-master replication? Maybe you modify this to work for the specific task you have in mind. -Steve ___ sqlite-users mailing list

Re: [sqlite] Multy-master replication of SQLite databases

2008-06-19 Thread Stephen Woodbridge
Alexey Pechnikov wrote: > В сообщении от Thursday 19 June 2008 20:23:22 Stephen Woodbridge написал(а): >> Alexey Pechnikov wrote: >>> Hello! >>> >>> Is any method for multy-master replication of SQLite databases? >> http://www.google.com/search?num=100=en

Re: [sqlite] Multy-master replication of SQLite databases

2008-06-19 Thread Stephen Woodbridge
Alexey Pechnikov wrote: > Hello! > > Is any method for multy-master replication of SQLite databases? > http://www.google.com/search?num=100=en=1=sqlite++replication ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Getting a table size without counting

2008-06-18 Thread Stephen Woodbridge
Dennis Cote wrote: > Alexey Pechnikov wrote: >> I think, you can use index directly as >> create index id_idx on mytable(id); >> >> select count(id) from mytable where id>0; >> >> explain query plan select count(id) from mytable where id>0; >> 0|0|TABLE mytable WITH INDEX id_idx >> >> It's better

Re: [sqlite] The APress SQLite Book

2008-06-18 Thread Stephen Woodbridge
In general, I have been very happy with it. It is a great introduction and provides lots of examples. I think of it as more of a tutorial than a reference manual. The SQLite web site is a better reference manual, but lacks the examples and sample code that the book offers. Once you get the

[sqlite] Windows VC++ 2008 Express Edition compile howto?

2008-06-16 Thread Stephen Woodbridge
Hi all, I would like to compile sqlite and spatialite using Windows VC++ 2008 Express Edition. I looked around on the website and wiki but knowing almost nothing about these tools there was no obvious answer to me. Does anyone have a step by step howto compile sqlite with VC++ 2008 Express

Re: [sqlite] How to build an extension that gets autoloaded

2008-06-10 Thread Stephen Woodbridge
efault in the next version of the core sqlite library. > > -Shane > > On Tue, Jun 10, 2008 at 12:39 AM, Stephen Woodbridge < > [EMAIL PROTECTED]> wrote: > >> Hi all, >> >> I was reading through the sqlite source and noticed that there appears >> to b

[sqlite] How to build an extension that gets autoloaded

2008-06-09 Thread Stephen Woodbridge
and paths and things that can go wrong if the user messes with things and since it is a dedicated application it will always need the extension. If this is already documented somewhere, please just point to it. Thanks, -Stephen Woodbridge http://imaptools.com

Re: [sqlite] What is quicker?

2008-06-04 Thread Stephen Woodbridge
Christophe Leske wrote: > Shane Harrelson schrieb: >> Dennis- >> >> Your last "simplification": >> > I never got that email from Dennis, I would be very interested in it. > > Dennis, this is actually what i am currently doing. > > However: > > i see no speed up for large areas (half the