Re: [sqlite] (no subject)

2009-06-01 Thread Kees Nuyt
ine on simulator. > >Can anyone provide any input on this? ASCII versus UTF-8 or UTF-16? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Deleting database content : SQLite3 API

2009-05-30 Thread Kees Nuyt
p, I cannot just drop the >> tables. ( As the table which are present in the existing data base is >> not known. ) >> >> I am using sqlite3wrapped C++ library APIs. >> >> Thanks and Regards, >> Souvik -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] create indexed view

2009-05-26 Thread Kees Nuyt
On Tue, 26 May 2009 14:44:25 +0800, wying wy <joyousl...@gmail.com> wrote: >Hi > >May I know if we can create index on a View? You can't create an index on a VIEW. A VIEW can be seen as a stored SELECT statement. >Thanks in advance. >wying --

Re: [sqlite] Simple Outer Join question?

2009-05-25 Thread Kees Nuyt
s simple, but not for me. This is an n:m relationship. If group has more attributes (columns) than just its number, you need a third table: person_group. Then join person with person_group where group_id != 1; The person_group table could be called membership, if you like. >Thanks in advance &g

Re: [sqlite] most efficient way to get 1st row

2009-05-19 Thread Kees Nuyt
QLite sort the resultset before it can return the first row in the resultset. Need I say more? http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/

Re: [sqlite] Sqlite as a FIFO buffer? (How make atomic?)

2009-05-18 Thread Kees Nuyt
gt;Table: task_status_log => (id, fk_task_log, status_code, time_stamp) > >And in psudo SQL: > >TRIGGER ON INSERT INTO task_log: >BEGIN >INSERT INTO task_fifo (fk_task_log) VALUES (NEW.id) >END; > >TRIGGER ON DELETE FROM task_fifo: >BEGIN >

Re: [sqlite] Sqlite as a FIFO buffer?

2009-05-18 Thread Kees Nuyt
par = $this->prepare($sql); if (is_array($parlist)){ /* we got a text array with params */ foreach ($parlist as $aval){ $stpar->execute(array(':jobid' => $jobid, ':partx' => $aval)); } } else if (is_object($parlist)) { /* we got a resultset from a query as paramlist */ while ($row = $parlist->fetch(PDO::FETCH_NUM)){ $stpar->execute(array(':jobid' => $jobid, ':partx' => $row[0])); } } } else { } $this->commit(); /* * ugly code to launch the dispatcher asynchronously using * Windows schtasks.exe is left to the imagination of the reader */ } -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multiple counts between two tables

2009-05-10 Thread Kees Nuyt
, is that the same application ('d') uses the same tag more then once. Is that on purpose? In other words, it's not completely clear to me what you are trying to accomplish. >Regards, >-steffen > > >Kees Nuyt wrote: >> >> On Sun, 10 May 2009 13:51:29 -0700 (PDT), ck

Re: [sqlite] Multiple counts between two tables

2009-05-10 Thread Kees Nuyt
FROM tag_link INNER JOIN app_name ON (app_name.id = tag_link.app_id) GROUP BY tag_link.app_id; app_name.id|app_name.app|nrtags 30|a|1 39|b|1 49|t|2 331|d|3 >The parser returns no error, only seems to freeze. Tipps, hints – all kind >of advice. >sincerely, ckeen Hope this helps. -- (

Re: [sqlite] Newbie trying to list resultSet with C

2009-05-08 Thread Kees Nuyt
an SQLite database. Very basic but fully functional nevertheless. http://www.sqlite.org/cvstrac/wiki?p=SampleCode Example C code for creating / writing to / reading from a database. >TIA, >Nuno Magalhães -- ( Kees Nuyt ) c[_] ___ sqlite-use

Re: [sqlite] sqlite in shell loop

2009-05-06 Thread Kees Nuyt
On Wed, 6 May 2009 23:24:00 +0200, Daniel Wolny <dan...@szelka.net> wrote: >2009/5/6 Kees Nuyt <k.n...@zonnet.nl>: >> On Wed, 6 May 2009 23:01:24 +0200, Daniel Wolny >> <dan...@szelka.net> wrote: >> It should be possible, sqlite sends its output to std

Re: [sqlite] Sqlite3 tables hidden from program to program

2009-05-06 Thread Kees Nuyt
arameter on the sqlite command line? As in: # sqlite3 my.db See also: http://www.sqlite.org/quickstart.html If you leave out the databasefilename, sqlite uses an in-memory database, which is destroyed as soon as you leave/quit/exit the command li

Re: [sqlite] sqlite in shell loop

2009-05-06 Thread Kees Nuyt
put to stdout, so it works like any other unix utility. Just give it a go. Experiment. And enjoy. >Thanks in advance -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Increasing output

2009-05-06 Thread Kees Nuyt
m not sure what you mean here. Guessing: To sort by the third column of your result set, use: SELECT * FROM mytable ORDER BY name_of_third_column; or SELECT * FROM mytable ORDER BY 3; >Thanks in advance. -- ( Kees Nuyt ) c[_] ___ sqlite-users

Re: [sqlite] sqlite3 source code modification

2009-05-06 Thread Kees Nuyt
's never printed anything. I even reinstalled my os system. >I am pretty much confused with it. Could anyone give me some advice, please? In your shell, type: which sqlite3 Does the result point to the result of yur compilation of sqlite3 ? >Thanks so much. -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] SQL error: database disk image is malformed

2009-05-06 Thread Kees Nuyt
On Wed, 6 May 2009 00:40:22 -0500, "Jay A. Kreibich" <j...@kreibi.ch> wrote: >On Tue, May 05, 2009 at 11:46:38PM +0200, Kees Nuyt scratched on the wall: >> On Tue, 5 May 2009 16:55:42 -0400, Pavel Ivanov >> <paiva...@gmail.com> wrote: >> >>

Re: [sqlite] SQL error: database disk image is malformed

2009-05-05 Thread Kees Nuyt
re right, it doesn't make sense. @Joannek: When using group by, your select columns can only use aggregate functions and the columns you group by. Perhaps you meant to use ORDER BY here ? >Pavel -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing

Re: [sqlite] How to check the healthy of database and the indexes of the tables

2009-05-05 Thread Kees Nuyt
;out that "database disk image is malformed". > Is there any command to check if the index >or database in good condition. PRAGMA integrity_check; http://www.sqlite.org/pragma.html#debug >Thanks, >JP -- ( Kees Nuyt ) c[_] ___ sql

Re: [sqlite] How to exit from sqlite shell?

2009-05-04 Thread Kees Nuyt
or. On Unix the Control-D by itself is enough. >Pavel -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to exit from sqlite shell?

2009-05-04 Thread Kees Nuyt
ix systems > - I don't know if Control-D works on windows) Control-D doesn't work in sqlite3.exe on windows, Control-C does, both in the windows shell (CMD.EXE) and in msys (mingw32) bash. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] create the trigger to delete the data from other database

2009-04-22 Thread Kees Nuyt
cross Attached Databases (2008-01-24 11:56:16 UTC). Cheers, -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite syntax railroad diagrams

2009-04-21 Thread Kees Nuyt
@hwaci.com> Date: Mon, 20 Apr 2009 06:53:37 -0400 : http://wiki.tcl.tk/21708 >They're very nice :) > >Cheers, >Andrey -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] retrieval of blobs stored in sqlite

2009-04-21 Thread Kees Nuyt
the optimum for your environment and application. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Tree structure in SQLite DB

2009-04-20 Thread Kees Nuyt
this DB? Roger Binns is right. Just another hint: Search for "adjacency model" and "nested set", which are the two most common models. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Mismatched columns in union can repeatably crash 2.6.10

2009-04-15 Thread Kees Nuyt
ng else, start with: http://www.sqlite.org/sitemap.html >Cheers, -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Kees Nuyt
For a normal application, you wouldn't have to drop tableB, but just insert / delete rows. What are you trying to accomplish? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] fail to drop table in transaction

2009-04-13 Thread Kees Nuyt
Does the same SQL work correctly from the command line tool? It is not very common to drop a table when data changes, usually the schema is stable and rows are inserted into and deleted from tables, or column values changed. It might indicate a flaw in your

Re: [sqlite] Heuristics of when to vacuum

2009-04-12 Thread Kees Nuyt
esn't tell anything about the average percentage of payload in database pages, which would be another reason to vacuum. For a full analysis, you'd have to run the sqlite3_analyzer program, or incorporate part of its code in your application. -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] SQLite performance on select/update with 11GB database file

2009-04-09 Thread Kees Nuyt
e they getting slower the >further I go? And why are the updates so slow? > >Is it because the database file is too big? > >Any help or suggestions would be highly appreciated! > >Regards, > >Flo -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread Kees Nuyt
a while, but if it's your personal system it won't hurt anybody. >Thanks! -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Insert performance in 3.6.11 vs. 3.5.5

2009-04-01 Thread Kees Nuyt
ed this, as now even the >original system no longer shows this effect, but it's very probably >not SQLite. > >Best regards, > >Günter Ok, I'm glad it works for you. Thanks for letting us know. -- ( Kees Nuyt ) c[_] ___ sqlit

Re: [sqlite] creating unique data takes many hours, help

2009-03-29 Thread Kees Nuyt
t; >sqlite3_exec(db, zSQL, 0, 0, 0); >sqlite3_free(zSQL); Two common optimizations: 1) Wrap the INSERT statements in a transaction while not EOF on input file BEGIN loop 1 times or EOF

Re: [sqlite] Newbie what does & do.

2009-03-28 Thread Kees Nuyt
syntax 6MATCH reserved for user C function match() 6REGEXP reserved for user C function regexp() 7ANDboolean (logical) AND 8OR boolean (logical) OR (Note to the SQLite developers: I could put this in the wiki but it might be better to update the http://www.sqlite.org/lang_expr.html#binaryops page itself) > Again sorry for the post. No problem. >Dp. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sequential row numbers from query

2009-03-27 Thread Kees Nuyt
lve it in the host language, which is what I would do. Actually, OP's original: sqlite3 db 'select * from foo order by field desc; '|cat -n is pretty good. Oh, well, there are 11 roads to Rome :) -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing

Re: [sqlite] Help with SQL and index (or schema?)

2009-03-27 Thread Kees Nuyt
On Fri, 27 Mar 2009 18:08:13 +0100, Kees Nuyt <k.n...@zonnet.nl> wrote: > PRIMARY KEY (filepathid,filename,istarget) Oops, make that PRIMARY KEY (pathid,filename,istarget) -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sql

Re: [sqlite] Help with SQL and index (or schema?)

2009-03-27 Thread Kees Nuyt
e absolute path), but I guess you are aware of that :) >Can someone help me? > >Regards, >Jonas -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Step Query

2009-03-26 Thread Kees Nuyt
On Wed, 25 Mar 2009 18:47:14 -0600, Dennis Cote <r.dennis.c...@gmail.com> wrote: >Kees Nuyt wrote: >> >> This seems a very nice addition to the >> http://www.sqlite.org/cvstrac/wiki?p=SampleCode >> we already have. >> >> I feel tempted to put it in th

Re: [sqlite] Insert performance in 3.6.11 vs. 3.5.5

2009-03-25 Thread Kees Nuyt
d everyone who contributed to this great peace of >software. +1 >Thanks and best regards, > >Günter -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Strict affinity again

2009-03-25 Thread Kees Nuyt
; > > > > >___ > >sqlite-users mailing list > >sqlite-users@sqlite.org > >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >___

Re: [sqlite] Step Query

2009-03-25 Thread Kees Nuyt
/cvstrac/wiki?p=SampleCode we already have. I feel tempted to put it in the wiki http://www.sqlite.org/cvstrac/wiki under the 'Hints For Using SQLite More Effectively' heading, as http://www.sqlite.org/cvstrac/wiki?p=SimpleCode. Would you mind if I do? -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] speeding up row by row lookup in a large db

2009-03-21 Thread Kees Nuyt
m for OS diskbuffers. > I will try out with PostGres and report back on what I get. I'm curious. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] speeding up row by row lookup in a large db

2009-03-21 Thread Kees Nuyt
6.11 and 3.6.12 (e.g. checkin 6341 http://www.sqlite.org/cvstrac/chngview?cn=6341 ). The effect would be that often used pages (like non-leaf index pages) are retained, which could reduce I/O. >Also, you might consider going 64-bit. -- ( Kees Nuyt ) c[_]

Re: [sqlite] speeding up row by row lookup in a large db

2009-03-21 Thread Kees Nuyt
SD) I have no idea what else can be done to improve performance. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] speeding up row by row lookup in a large db

2009-03-21 Thread Kees Nuyt
size I would start with the maximum page_size allowed, that is 32768 bytes. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] writting a text file from sqlite db in C

2009-03-21 Thread Kees Nuyt
gt;> Apart from the sqlite command line tool, I can recommend >> the source of fossil, which does all its magic around a >> SQLite database: >> http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki >> >> Also, there is some code in the SQLite wiki: >> http://www

Re: [sqlite] memory and db size

2009-03-19 Thread Kees Nuyt
nfo on http://www.sqlite.org/ about architecture and optimization. > 3. Are there any ways to compress db files in disk (for > free) and then is sqlite able to still get to the data > easily? Donald already gave a good answer to that question. > Thank you! -- ( Kees Nuyt ) c[_]

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread Kees Nuyt
synchronous=off (only during loading) By the way, INTEGER PRIMARY KEY is faster than a TEXT column (VARCHAR is also TEXT) as primary key. >thnx -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Any available free SQLite Database Comparer/Diff Tool?

2009-03-19 Thread Kees Nuyt
ite3 test_41.db3 .dump >t41 # diff t38 t41 >Thanks, >Ev -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread Kees Nuyt
mary key on a text column) that won't make a difference, I think. >thank you -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Schema syntax error

2009-03-19 Thread Kees Nuyt
; Which when enabled allows you to UPDATE or DELETE against the sqlite_master table. == Using this PRAGMA, you can UPDATE the sql column in the sqlite_master table. Of course this is undocumented and unsupported, and you risk corru

Re: [sqlite] Newbie question

2009-03-18 Thread Kees Nuyt
in mind all the comments about single quotes. > >A bit more information though. Is there a term for >that type of SELECT statement? See above. >Thanx, >Dp. HTH -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] IP from number with SQL

2009-03-15 Thread Kees Nuyt
'|| > CAST((intIP & 65280) >> 8 AS text)||'.'|| > CAST((intIP & 255) AS text) AS strIP > FROM IP_table; Cute code, thanks. The implementation of BitAnd and ShiftRight in the SQLite VM (~line 10176 in the amalgamated sqlite.c) is very straightforward and should be pretty fast. &g

Re: [sqlite] LEFT INNER JOIN a second database

2009-03-14 Thread Kees Nuyt
y Shower|Carrot Cake 9|2|The Jacket| 10|2|The Chinese Restaurant| 11|2|The Phone Message| 12|2|The Apartment| 13|2|The Stranded|Cinnamon Bobka 14|2|The Statue| # -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite

Re: [sqlite] Query Doesn't Find Record

2009-03-13 Thread Kees Nuyt
his for the Windows platform. sqlite3.exe in a CMD window. If I suspect the SQL is difficult enough to make typoos, I write a script with an ascii editor. sqlite3 test.db3 Thanks. > >Jonathan -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sq

Re: [sqlite] Upgrade from 3.5.9 to 3.6.11

2009-03-13 Thread Kees Nuyt
3.6.11. > Thank in advance, > JP -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite Database Corruption

2009-03-13 Thread Kees Nuyt
http://www.sqlite.org/lockingv3.html#how_to_corrupt http://www.sqlite.org/cvstrac/wiki?p=DatabaseCorruption http://www.sqlite.org/atomiccommit.html >Thanks and regards > >Chaitali -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite

Re: [sqlite] LEFT INNER JOIN a second database

2009-03-12 Thread Kees Nuyt
) VALUES (2,""); .quit sqlite3 database1.sdb attach database 'database2.sdb' as db2 select . {{results}} .quit Hope this helps. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] writting a text file from sqlite db in C

2009-03-12 Thread Kees Nuyt
mpleCode >Thank you very much > >Michael -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] LEFT INNER JOIN a second database

2009-03-11 Thread Kees Nuyt
OIN db2.TableTwo n ON n.MyID=d.MyID WHERE d.Zip > 80000 ORDER BY d.Zip; DETACH DATABASE db2; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how to do fulltest with amalgamation source

2009-03-09 Thread Kees Nuyt
ww.sqlite.org/cvstrac/wiki?p=SqliteWikiFaq >If not, >are there any plans to add a "check" or "test" or "fulltest" target to >the amalgamation source? > >Thanks, > >Tim -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is there any way to attach more than 10 databases ?

2009-03-07 Thread Kees Nuyt
to attach > at least 30 db at once ? It's in the documentation: http://www.sqlite.org/lang_attach.html >thanx! > >bax -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] which func could get the number of rows

2009-03-07 Thread Kees Nuyt
h >kind of codes when using "sqlite3_prepare_v2() + sqlite3_step() + >sqlite3_column_*()"? Perhaps the sqlite3_get_table() API is what you are looking for? http://www.sqlite.org/c3ref/free_table.html > >Kees Nuyt wrote: >> >> On Fri, 6 Mar 2009 02:15:10 -0800 (PST

Re: [sqlite] shared cache and SQLITE_MISUSE on sqlite3_step()

2009-03-06 Thread Kees Nuyt
t.c > >If somebody found it useful or good enough: Feel free to use it, change it, >or put on wiki pages. I added it to the Wiki : http://www.sqlite.org/cvstrac/wiki?p=SampleCode -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-u

Re: [sqlite] which func could get the number of rows

2009-03-06 Thread Kees Nuyt
s. http://www.sqlite.org/lang_transaction.html I hope this helps and I added it to the wiki FAQ: http://www.sqlite.org/cvstrac/wiki?p=SqliteWikiFaq -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bi

Re: [sqlite] Double entry bookkeeping

2009-03-05 Thread Kees Nuyt
iety of clients and >developers. Here are the top group of items I think you have missed: [snip] Excellent article! -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Joins

2009-03-02 Thread Kees Nuyt
oogle.com/search?hl=en=SQL+join+"cheat+sheet"+sqlite >Michael > >___ >sqlite-users mailing list >sqlite-users@sqlite.org >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- ( Kees Nuyt ) c[_] _

Re: [sqlite] DateTime Objects

2009-03-01 Thread Kees Nuyt
e functions to return any of a few supported formats your application can cope with. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] DateTime Objects

2009-02-28 Thread Kees Nuyt
cation do the formatting. SQL isn't meant for presentation anyway, it's for relational storage. Example: Compute the time since the unix epoch in seconds (like strftime('%s','now') except this includes the fractional part): SELECT (julianday('now') - 2440587.5)*8640

Re: [sqlite] view and attach database problem

2009-02-27 Thread Kees Nuyt
On Sat, 28 Feb 2009 00:20:48 +0300, Alexey Pechnikov <pechni...@mobigroup.ru> wrote: >Hello! > >On Friday 27 February 2009 21:50:30 Kees Nuyt wrote: >> A view or trigger in one database is not allowed to >> reference tables (or other views) in other databases. T

Re: [sqlite] Question

2009-02-26 Thread Kees Nuyt
I don't advise this, it's hard to maintain. A loadable extension is the "proper mechanism". >-Bryan -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] manual with sample C programs

2009-02-26 Thread Kees Nuyt
>Thanks very much > >Michael R -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] running sqlite with gcc C

2009-02-25 Thread Kees Nuyt
g more time on the site ;) -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] running sqlite with gcc C

2009-02-25 Thread Kees Nuyt
l http://www.sqlite.org/cvstrac/wiki >Thank you very much > >Michael R HTH -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Newb-ish performance questions

2009-02-22 Thread Kees Nuyt
make it too big. 4096 or 8192 are a good start to experiment with. > Unless anyone has some good ideas I might > have to give up on Sqlite. I'm sure you can get more performance if you tweak page_size and cache_size with some more understanding. Use whatever engine is best for the tas

Re: [sqlite] SQLite- Memory heap usage query

2009-02-17 Thread Kees Nuyt
On Tue, 17 Feb 2009 19:11:56 +0100, Kees Nuyt <k.n...@zonnet.nl> wrote in sqlite-users@sqlite.org: I'm not fond of replying to myself, but this needs some clarification: >- Try to use integers as primary key, > make it the first column, << wrong > and use the exact

Re: [sqlite] SQLite- Memory heap usage query

2009-02-17 Thread Kees Nuyt
ma - Do not define indexes that are seldomly used - Try to use integers as primary key, make it the first column, and use the exact code CREATE TABLE tablename ( columnname INTEGER PRIMARY KEY, ); - Do not store data that you don't need >Thanks in ad

Re: [sqlite] Full Table Read

2009-02-13 Thread Kees Nuyt
is is slow, just curious. The speed very much depends on what you do with the output. If it scrolls over a terminal, the terminal will be the bottleneck. It should be very fast if you redirect the output to /dev/null. -- ( Kees Nuyt ) c[_] ___ sqlite-users m

Re: [sqlite] open/close db's across threads

2009-02-13 Thread Kees Nuyt
) and sqlite3_finalize()? Do you check the return code of sqlite3_close() ? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] using sqlite for searching

2009-02-13 Thread Kees Nuyt
be good enough. Will you use FTS? http://www.sqlite.org/cvstrac/wiki?p=FtsTwo >Can any one help me with this. It would be really helpful to me. >Thank You in Advance -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite- Memory heap usage query

2009-02-13 Thread Kees Nuyt
e_size. For the :memory: database, you see the rows being stored in memory and perhaps also some cache. Obviously, both cases also use some memory to store the datastructure that stores the interpreted schema and housekeeping stuff. >Thanks in advance, >Jai More detail can

Re: [sqlite] Saving and loading SQLite pages from a buffer

2009-02-07 Thread Kees Nuyt
be available in the command line tool: sqlite> .help .backup ?DB? FILE Backup DB (default "main") to FILE .restore ?DB? FILE Restore content of DB (default "main") from FILE http://www.sqlite.org/draft/sqlite.html >D. Richard Hipp >d...@hwaci.com

Re: [sqlite] database encrypted

2009-01-28 Thread Kees Nuyt
e > >Enter ".help" for instructions >sqlite> .schema >Error: file is encrypted or is not a database >sqlite> -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Progress update while Prepare() is executing

2009-01-26 Thread Kees Nuyt
On Mon, 26 Jan 2009 10:44:12 -0600, Nicolas Williams <nicolas.willi...@sun.com> wrote in General Discussion of SQLite Database <sqlite-users@sqlite.org>: >On Sun, Jan 25, 2009 at 01:32:57PM +0100, Kees Nuyt wrote: [...] >> To get a % progress indicator you need a mor

Re: [sqlite] Lock SQLite file by overwriting bytes and then un-lock?

2009-01-25 Thread Kees Nuyt
ideas about this. > >RBS If the security is important to you, it might be worth to invest in SEE, the proprietary, licenced, SQLite Encryption Extension: http://www.sqlite.org/support.html It makes sure only your application can access the database. -- ( Kees Nuyt ) c[_]

Re: [sqlite] Slow Performance for INSERT

2009-01-25 Thread Kees Nuyt
t; >Insert Statement (in TCL): > >switch -exact -- $Variable_Record_Type { > >HEADER { db1 eval "INSERT INTO HEADER($Variable_Column_Name) VALUES >($Variable_Column_Value)"} >TRAILER { db1 eval "INSERT INTO TRAILER($Variable_C

Re: [sqlite] Progress update while Prepare() is executing

2009-01-25 Thread Kees Nuyt
mns and a user is given the >ability to design his own Querie that may include >columns that are not indexed. Exact progress indicators are hard. It's better to optimize the schema and selects and not need progress indicators at all. With proper design, 40k rows and no joins, most selects

Re: [sqlite] JDBC and sqllite 1.1

2009-01-23 Thread Kees Nuyt
is too much of an effort, and you have to use the old database format, why not simply keep using the ancient jdbc version that is able to access it? >Best regards, >Garp -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.

Re: [sqlite] Try to recover deleted rows in sqlite?

2009-01-18 Thread Kees Nuyt
n happen, and your data is important, it makes sense to include history tables in your schema, and create an ON DELETE triggers to save deleted rows to the history tables. That way you even would be able to recover rows that have been inserted and deleted after the most recent backup. --

Re: [sqlite] FW: A list as an SQL paramater

2009-01-15 Thread Kees Nuyt
epare each time I want to run the query." > > > > >Maybe you would be preparing hundreds or thousands of different queries >per minute -- but if by chance you're not -- could anyone be expected to >notice the time for the prepare's? A

Re: [sqlite] Modularity, Joins

2009-01-15 Thread Kees Nuyt
lain.html http://www.sqlite.org/tempfiles.html http://www.sqlite.org/atomiccommit.html >Thanks. Hope this helps. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Documentation to learn sqlite code for newbies?

2009-01-10 Thread Kees Nuyt
tware developers (e.g using it for the > Firefox 3 bookmars engine)? > > I bought the book: "Sqlite: the definitive guide" > (by M. Owens). > > The book is great but, in my opinion, there are very > few examples. Of course it is impossible to write

Re: [sqlite] 600ms for simple query: How to optimize it?

2009-01-09 Thread Kees Nuyt
/www.sqlite.org/lang_explain.html Each JOIN is implemented as nested loops. The virtual machine code can tell a lot about what part of the database has to be scanned. >I have other queries which worry me. But that trick did not help in >these cases :-( > [...] > >Thank you a

Re: [sqlite] KEY keyword

2009-01-09 Thread Kees Nuyt
, panel, output_data) VALUES ..; will delete the original row and insert the new one. None of the original columns values in the affected row will survive. >thanks, >ed -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] update PHP

2009-01-08 Thread Kees Nuyt
ll ; ; php_pdo_sqlite_external.dll loads ; a genuine sqlite3.dll extension=php_pdo_sqlite_external.dll >Thanks for help > >nobs Hope this helps. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite with NAS storage

2009-01-07 Thread Kees Nuyt
e many other reasons. > > There is a lot of files. So, I don't know exactly > why at this time, But thought network latency > can´t be denied. > > /Edward Which of my suggestions did you already try? >On Wed, Jan 7, 2009 at 4:07 AM, Kees Nuyt <k.n...@zonnet.nl> wrote:

Re: [sqlite] SQLite with NAS storage

2009-01-07 Thread Kees Nuyt
broker servers. I'm afraid the chosen architecture isn't scalable, and code tweaking in sqlite will not help much. Opening and closing one of 20,000,000 files for every logical transaction is not suitable for such a scale. An operation of that size should be able to construct a better so

Re: [sqlite] Fwd: memory usage

2009-01-07 Thread Kees Nuyt
each individual database's memory usage? > >I found the functions sqlite3_memory_used() and >sqlite3_status(SQLITE_STATUS_MEMORY_USED, ...) but these look like they >provide memory statistics for all of sqlite, not per database. > >thanks, >ed Hope this helps. -- (

Re: [sqlite] Deleting duplicate records

2009-01-06 Thread Kees Nuyt
idate INTEGER, somecol text, PRIMARY KEY (member_id, idate) ON CONFLICT IGNORE ); INSERT INTO talks SELECT * FROM talks_with_dups; >Craig Smith >cr...@macscripter.net -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sq

Re: [sqlite] "meta command" via string via shell?

2009-01-05 Thread Kees Nuyt
e tabs\nselect * from DS0001 limit 1;" | sqlite3 NLSY.db > THanks so much to a very helpful list! > -W -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] cancel query in sqlite

2008-12-28 Thread Kees Nuyt
ation then. Hopefully zeos implemented the sqlite3_interrupt() call. http://www.sqlite.org/c3ref/interrupt.html -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

<    1   2   3   4   5   6   7   8   9   >