Re: [sqlite] Compile test example problem

2009-10-02 Thread P Kishor
On Fri, Oct 2, 2009 at 9:01 PM, David Morris wrote: > > Thanks for your reply Roger, but doesn't the inclusion of the sqlite3.h file > do that? No, you have to link against the correct library. For example, if you have your sqlite library under /usr/local/lib, you will

Re: [sqlite] Compile test example problem

2009-10-02 Thread David Morris
Thanks for your reply Roger, but doesn't the inclusion of the sqlite3.h file do that? If not, could you give me a better example please? David Roger Binns wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > David Morris wrote: >> Building sqliteFirst.obj. >> Building

Re: [sqlite] Compile test example problem

2009-10-02 Thread Jean-Christophe Deschamps
Gidday, >Building sqliteFirst.obj. >Building SQLiteFirst.exe. >POLINK: error: Unresolved external symbol '_sqlite3_open'. >POLINK: error: Unresolved external symbol '_sqlite3_errmsg'. >POLINK: error: Unresolved external symbol '_sqlite3_close'. >POLINK: error: Unresolved external symbol

Re: [sqlite] Compile test example problem

2009-10-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Morris wrote: > Building sqliteFirst.obj. > Building SQLiteFirst.exe. > POLINK: error: Unresolved external symbol '_sqlite3_open'. > POLINK: error: Unresolved external symbol '_sqlite3_errmsg'. > POLINK: error: Unresolved external symbol

[sqlite] Compile test example problem

2009-10-02 Thread David Morris
I am using Pelles C 6.00.4 for Windows on Vista. It doesn't compile and any help would be appreciated. /**See also the Introduction To The SQLite C/C++ Interface for an introductory overview and roadmap to the dozens of SQLite interface functions.**/ #include #include static int

Re: [sqlite] Multiline SQL command via C or Objective-C

2009-10-02 Thread Igor Tandetnik
BareFeet wrote: > By contrast (to points 3 and 4), the sqlite3 command line utility > handles multiple table outputs (with different numbers of columns) > fine and seems to understand the types of data if using a mode that > discerns it. Because it runs these statements one by one using

Re: [sqlite] performance of select in transactions

2009-10-02 Thread Simon Slavin
On 2 Oct 2009, at 8:40pm, Mike Shal wrote: > Ahh, ok - that makes sense. Does this locking overhead not occur on > other platforms (I've only tried linux -- gentoo and ubuntu), or if > sqlite is built differently? It's to do with how the platform (OS and hard disk format) support file

Re: [sqlite] performance of select in transactions

2009-10-02 Thread Mike Shal
On 10/2/09, Pavel Ivanov wrote: > > It seems a bit disingenuous to claim > > there will be no performance gain by putting selects in a transaction, > > when sqlite clearly does less work with the transaction (in the form > > of not getting the read lock multiple times). > >

Re: [sqlite] performance of select in transactions

2009-10-02 Thread Pavel Ivanov
> It seems a bit disingenuous to claim > there will be no performance gain by putting selects in a transaction, > when sqlite clearly does less work with the transaction (in the form > of not getting the read lock multiple times). It's pretty ingenuous in fact to silently assume that nobody wants

Re: [sqlite] performance of select in transactions

2009-10-02 Thread Mike Shal
On 10/2/09, Pavel Ivanov wrote: > > Does anybody know why just adding the begin/commit here improves > > performance? If I have to do a large number of selects like this in my > > application, should I always wrap it in a transaction? > > > This looks like some overhead of

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread Cory Nelson
On Fri, Oct 2, 2009 at 9:45 AM, Francisc Romano wrote: > Wow. I did not expect such a quick answer... > Is there somewhere I can read exactly how fast and how big databases SQLite > can take, please? SQLite uses a b+tree internally, which is logarithmic in complexity. Every

Re: [sqlite] performance of select in transactions

2009-10-02 Thread Pavel Ivanov
> Does anybody know why just adding the begin/commit here improves > performance? If I have to do a large number of selects like this in my > application, should I always wrap it in a transaction? This looks like some overhead of your file system. When you don't put begin/commit around selects

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread Francisc Romano
Very good idea! Thank you! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Francisc Romano wrote: > how big databases SQLite can take, please? Someone told me recently they have 37GB and 66 million rows in their data set. Another user is using the virtual table functionality together with synthetic indices to optimise

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread P Kishor
On Fri, Oct 2, 2009 at 11:45 AM, Francisc Romano wrote: > Wow. I did not expect such a quick answer... > Is there somewhere I can read exactly how fast and how big databases SQLite > can take, please? See http://www.sqlite.org/limits.html for "how big." You will have to do

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread Francisc Romano
Wow. I did not expect such a quick answer... Is there somewhere I can read exactly how fast and how big databases SQLite can take, please? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite performance with lots of data

2009-10-02 Thread P Kishor
On Fri, Oct 2, 2009 at 11:42 AM, Francisc Romano wrote: > Hello! > > I am not entirely certain this is the right way to proceed, but I haven't > been able to find the appropriate official SQLite forum (if one exists). > I want to create a rather complex AIR application that

[sqlite] SQLite performance with lots of data

2009-10-02 Thread Francisc Romano
Hello! I am not entirely certain this is the right way to proceed, but I haven't been able to find the appropriate official SQLite forum (if one exists). I want to create a rather complex AIR application that will have to deal with a massive database. My question is: Is SQLite capable of dealing

[sqlite] dump in-memory db to file in tcl

2009-10-02 Thread Ned Fleming
Is it possible to dump an in-memory sqlite database (or table?) to a file from within Tcl? I create it like so: sqlite3 dbFireData :memory: and insert a bunch of records, and then commit. I have tried the following (and variations) -- but no go, kokomo. ($fileOut3 is a handle to a

Re: [sqlite] DB Corruption

2009-10-02 Thread Simon Slavin
On 2 Oct 2009, at 2:13pm, Reusche, Andrew wrote: > sqlite> pragma integrity_check; > > wrong # of entries in index sales_datetime Which version of SQLite are you using ? DROP the index then MAKE it again, then do the 'PRAGMA integrity_check' thing again. If that didn't help I suspect that

Re: [sqlite] DB Corruption

2009-10-02 Thread Pavel Ivanov
> So any idea what might have caused this, a good way to fix it, or detect > it at runtime? The other threads that I have read point to either > multithreading issues, or an ungraceful shutdown. And they're right, except that ungraceful shutdown will hurt your database only if you set pragma

[sqlite] DB Corruption

2009-10-02 Thread Reusche, Andrew
I have an issue with a sqlite3 db. I have a table that yields invalid data in some queries. Select sales.* >From sales Where sales.record_type = 1 Order By sales.datetime Desc Yields the top 124 or so records as all duplicates, and the record_type column has a "0" in each record.

Re: [sqlite] Error in type-def syntax diagram notation??

2009-10-02 Thread Igor Tandetnik
Keith Roberts wrote: > I'm trying to learn the syntax for SQLite, and I'm getting > stuck with the type-def production in: > > http://www.sqlite.org/lang_createtable.html > > Should name not be a selection of available type names, > instead of an iteration? With SQLite, there is no exhaustive

Re: [sqlite] DROP TRIGGER-Statement within a Trigger

2009-10-02 Thread Kees Nuyt
On Fri, 2 Oct 2009 12:18:11 +0200, Michael Werber wrote: >KN> The need to change a schema on the fly is usually caused by >KN> bad design. What is the probvlem you try to resolve? > > the problem is i have a table that should contain only the > last xxx inserts.

Re: [sqlite] Sqlite Mailing List, different view from DB.

2009-10-02 Thread Igor Tandetnik
It appears that you aren't asking about SQLite, but about nabble.com mirror of SQLite's mailing lists. Realize that Nabble is in no way affiliated with SQLite - they are a third party that chooses to aggregate and archive lots of different mailing lists, including those where SQLite is

Re: [sqlite] DROP TRIGGER-Statement within a Trigger

2009-10-02 Thread Michael Werber
KN> The need to change a schema on the fly is usually caused by KN> bad design. What is the probvlem you try to resolve? the problem is i have a table that should contain only the last xxx inserts. to do so i created a trigger: CREATE TRIGGER trg_TrimMessdataLast AFTER INSERT ON

Re: [sqlite] DROP TRIGGER-Statement within a Trigger

2009-10-02 Thread Kees Nuyt
On Fri, 2 Oct 2009 10:43:38 +0200, Michael Werber wrote: >hallo Sqlite-users, > >i want to update a trigger from within another trigger. because there is no >update-trigger statement i tried to drop and recreate my trigger. i >tried this: > >CREATE TRIGGER

[sqlite] Sqlite Mailing List, different view from DB.

2009-10-02 Thread Basheer.Yakoob
I have the following question from the SQLite Mailing List, would be great if anyone can answer. How the different view in the mailing list is working: 1) For example from the DB if we have three different views. How will be the view updated if one Tuple updated or changed from the DB?

[sqlite] DROP TRIGGER-Statement within a Trigger

2009-10-02 Thread Michael Werber
hallo Sqlite-users, i want to update a trigger from within another trigger. because there is no update-trigger statement i tried to drop and recreate my trigger. i tried this: CREATE TRIGGER trg_update AFTER UPDATE ON SystemData BEGIN DROP TRIGGER trg_TrimMessdataLast; -- CREATE

Re: [sqlite] Error in type-def syntax diagram notation??

2009-10-02 Thread Dan Kennedy
On Oct 2, 2009, at 12:33 PM, Keith Roberts wrote: > I'm trying to learn the syntax for SQLite, and I'm getting > stuck with the type-def production in: > > http://www.sqlite.org/lang_createtable.html > > I read it as a type-def production is a sequence of one or > more instances of a terminal