Re: [sqlite] WAKEUP !!! SOMEBODY IS DESTROYING THE WIKI PAGES

2006-03-30 Thread Chris Schirlinger
> Looks strange, many changes now, today, in short time. But I cannot > judge what is changed, some one should take a look at it. That may have been me When I saw there was the spam warning I had a look and discovered many pages were completely replaced with http://www.porn.link//whatever1000

Re: Re[2]: [sqlite] To whom to inform on a bug?

2006-02-14 Thread Chris Schirlinger
I tried the data you mentioned in SQLite Explorer and the SQL statemen worked correctlyt: > select * from tResult where tex like '%ra%' returned the expected record perfectly Here is the output of the command line test SQLite version 3.3.3 Enter ".help" for instructions sqlite> .schema CREA

Re: [sqlite] String to numeric conversion

2006-02-08 Thread Chris Schirlinger
I'd say leave it as it is .. ie "12.34" is a string "12.34" is a number This way you have all the options you need and it's up to the coder to decide what they want. If " 12.34" is a string it's fine If " 12.34" is *NOT* a string, then TRIM it and pass it SQLite cleaned up If you chan

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Chris Schirlinger
We have the same issue, to get around it we fire a thread when the program starts, intelligently "touching" every table that the user is likely to access (As Michael Sizaki already mentioned a select count(last_column) from big_table; will do it) Since a user is very unlikely to run a program a

Re: [sqlite] Problem with import

2006-01-19 Thread Chris Schirlinger
I created your schema and saved the single line you provided to a file and it all imported fine: sqlite> .nullvalue NULL sqlite> .separator ; sqlite> .import text.txt Cliente sqlite> select * from cliente; 1|2005-02-13 00:00:00|FRANCISCO EDNAN SABOIA PONTES |0|R|NEWTON PARENTE|1161|PRO XIMO AO COM

Re: [sqlite] Performance problem with 3.2.7

2005-11-21 Thread Chris Schirlinger
Are you wrapping the transactions in between Begin/End Transactions? BEGIN TRANSACTION; INSERT INTO table (foo) VALUES (bar); INSERT INTO table (foo) VALUES (par); INSERT INTO table (foo) VALUES (tar); INSERT INTO table (foo) VALUES (far); .. INSERT INTO table (foo) VALUES (car); INSERT INTO table

Re: [sqlite] Unable to load DLL Help!

2005-11-19 Thread Chris Schirlinger
> [DllNotFoundException: Unable to load DLL (sqlite3).] ... > Im assuming "unable to load dll" is not the actual problem, the dll is in > the correct directory and was working fine until today. I tried an old > version of sqlite3.dll (before the autoincrement feature was implemented) > which seeme

Re: [sqlite] Optimal page size

2005-10-25 Thread Chris Schirlinger
> For what it is worth I did some trials in matching page size to the > underlying virtual memory page size and was surprised to find that I did > not measure any significant performance change. My guess is that it is > the structure of the data in your application which would be sensitive > t

Re: [sqlite] Optimal page size

2005-10-25 Thread Chris Schirlinger
We found the best setting for page size was to match the size of the cluster size of the drive the database was expected to run on 4096 in Win32 machines and 1024 on nix ones (I think, I am no expert on Unix style OS's) I would think, if you set it to the exact size of a number of records all

Re: [sqlite] Re: Multithreading Question

2005-10-24 Thread Chris Schirlinger
> Well, I guess I was not clear in my explanations. > I'm already doing my own locking, that's the problem! > But I'm not sure how to improve it. ... > At which stage the data will be saved it and. > > that will froze the application because the search/select already get the > database lock.

Re: [sqlite] threading and win32

2005-10-19 Thread Chris Schirlinger
I'm using threads and SQLite on a Win32 system I can tell you that things may work 100% for ages, then one day, the moons align and the threads will fall over each others feet It may happen later, rather than sooner, and may not even happen in your lifetime, but it'll happen :) > I wasn't doi

Re: [sqlite] Speed Test Done !

2005-10-05 Thread Chris Schirlinger
> You can load sqlite into memory? > I do have 2GB of RAM. You can pass ":memory:" to the sqlite_open command to open a SQLite database in memory I think it is I imagine this will speed up your retrievals but without an index it will still be slower that it should be. With an index I imagine

Re: [sqlite] any suggestion for the database file extension?mine is xxx.drh

2005-09-27 Thread Chris Schirlinger
I recommend not using SDB (on windows machines) SQLite DataBase sounded like a good name too :) That is the default extension for something called "Appfix Package" and in certain circumstances, Windows will automatically back the DB up every time it is changed thinking that a DLL or Application

Re: [sqlite] count(*) slow

2005-09-15 Thread Chris Schirlinger
> Interesting. But, with the above suggestion, every INSERT or DELETE > would slow down anyway as much as it would have were SQLite to maintain > meta information itself, no? > > . > > Hence, it might be worthwhile maintaining the meta information no > matter what... most of the folks won'

[sqlite] Maximum num of tables?

2005-08-22 Thread Chris Schirlinger
I looked around, the FAQ, Wiki and history of this list but didn't see any solid reply Does anyone know what the maximum number of tables a SQLite 3.0 database can hold? We've got one that has 11k or so and it seems fine, but I am worried we may hit a limit

Re: [sqlite] beginnings with sqlite

2005-07-11 Thread Chris Schirlinger
> When I launch the program with the Terminal, if I write: > ./quickStart test.db "select * from personne", all occurs well, I > receives the data contained in the table "personne". But if I write > ./quickStart test "select * from personne", therefore I the extention in > the name of the data base

Re: [sqlite] Access Violations in sqlite3_step when in DLL

2005-04-06 Thread Chris Schirlinger
On 6 Apr 2005 at 3:13, Dan Kennedy wrote: Date sent: Wed, 6 Apr 2005 03:13:58 -0700 (PDT) From: Dan Kennedy <[EMAIL PROTECTED]> Subject:Re: [sqlite] Access Violations in sqlite3_step when in DLL To: sqlite-users@sqlite.org, [EMAIL

Re: [sqlite] Access Violations in sqlite3_step when in DLL

2005-04-06 Thread Chris Schirlinger
Sadly, I have narrowed down the issue to some sort of memory clash between the SQLite3 DLL and the EXE that is calling our plugin I can change the code to retrieve data from almost *anything* else from faked random data created on the fly, through ASCII CSV files loaded into TStringLists to

Re: [sqlite] Access Violations in sqlite3_step when in DLL

2005-04-05 Thread Chris Schirlinger
> Sounds like the calling type is different. Do you know if the EXE is > calling your stuff using stdcall or cdecl, and does it match your > functions? If you don't specify, your functions are cdecl. I've seen > this kind of thing when they don't match. It may work a couple of > times, but eventual

[sqlite] Access Violations in sqlite3_step when in DLL

2005-04-05 Thread Chris Schirlinger
We have been using SQLite3 for a while now without issues. We are running a EXE calling a DLL (Which calls a DLL which eventually uses the SQLite functions) These two DLL's are both written in Delphi - in Windows (with a delphi wrapper that runs the SQLite DLL) This code has worked fine under

Re: [sqlite] Database Version 2 or 3, can you query for it?

2005-03-01 Thread Chris Schirlinger
> Is it possible to query the database to see if it's 2.x or 3.x, we need to > know if the rowid's are 32 or 64 bit and we don't know what version we > might be running on? You can check the DB file header. The first 16 characters are "SQLite format 3\000" if it is version 3+ Check out http://w

Re: [sqlite] Re: sqlite performance variationin linux and windows

2005-02-24 Thread Chris Schirlinger
On 25 Feb 2005 at 10:33, Neelamegam Appadurai wrote: > But still, For the same application on windows, performance of sqlite > is slower compared to file system read or write which we were using > earlier. Hurm I cannot think of anything obvious. I know from experience that SQLite is faster tha

Re: [sqlite] Re: sqlite performance variationin linux and windows

2005-02-24 Thread Chris Schirlinger
On 25 Feb 2005 at 9:38, Neelamegam Appadurai wrote: > Could anyone please give me reason for variation in performance > between linux and windows. How are you testing this performance? Do you have a program written in windows and another written for linux? If so, the code/mechanism of DB access

Re: [sqlite] sqlite performance variationin linux and windows

2005-02-24 Thread Chris Schirlinger
On 24 Feb 2005 at 19:08, Neelamegam Appadurai wrote: > Can anyone please help me how to increase the performance on windows > enviroment Have a look at this Wiki http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows Some basic things to be aware of in there with regards to Speed and Win

Re: [sqlite] Relative efficiency of joins, subselects, and union/intersect

2005-02-23 Thread Chris Schirlinger
On 23 Feb 2005 at 18:36, Nathan Kurz wrote: > But maybe I'm not really understanding the advantages of the in-memory > database. Is it in some way inherently faster on lookups than just > setting SQLite to use a really large cache? Well the way I think of it is the if you don't need to keep the

Re: [sqlite] How to I set pragma page_size ?

2005-02-11 Thread Chris Schirlinger
> I have a Delphi SQLite wrapper. > It can Open database, run sql-s, etc. > > But I don't know, how to I set page size, because when I do open in > database, the pragma is not working, and when I try to exec sql before > open database, the wrapper is say: database not opened... > > Anybody have

Re: [sqlite] exact copy of an existing Table

2005-02-10 Thread Chris Schirlinger
> SQLiters: > what would be the most efficient method for creating an exact copy of an > existing table with all the columns and data of the existing table? You could just do this from commandline in SQL like so: CREATE TABLE newTable AS SELECT * FROM oldTable; That makes a new tables, same sch

Re: [sqlite] Speeding up your SQLite DB (Windows mostly)

2005-02-10 Thread Chris Schirlinger
> standard VCL stuff so there's a little overhead. But surely not as dramatic as > suggested. But there's one condition. Use transactions! Without them, you'll > never get a good performance. Perhaps not dramatic no, but I was getting to the point where I am setting DB page sizes to match OS Clu

Re: [sqlite] Speeding up your SQLite DB (Windows mostly)

2005-02-09 Thread Chris Schirlinger
> I wouldn't sell the BDE-style components short, as they may be useful > for some, if well-written and well-documented, but I like simple. Oh quite true, but in my case (and really what I was trying to get at in that monotribe) was to get the speediest database access, you'd be better server l

Re: [sqlite] Speeding up your SQLite DB (Windows mostly)

2005-02-09 Thread Chris Schirlinger
> Make a wiki page. Not a bad idea :) Done

[sqlite] Speeding up your SQLite DB (Windows mostly)

2005-02-09 Thread Chris Schirlinger
I've been posting a lot on speed and SQLite, just thought I'd dump the results and findings into one message including a nice example on how dumb you can get in the hopes no one else falls this low :) After several weeks of playing with SQlite3 we have finally gotton what we want out of a DB. F

Re: [sqlite] speedtest result is obsolete

2005-02-09 Thread Chris Schirlinger
> I think you people are missing the point here, the performance increase > you're seeing is all down to OS caching and will vary across different > ports. It's nothing to do with sqlite, and will affect every package. > > Therefore the only way to fairly compare mysql/postgress/sqlite is to ma

Re: [sqlite] speedtest result is obsolete

2005-02-08 Thread Chris Schirlinger
> Another trick you can pull is to create an index that > contains every column in the table with the cluster index > columns occuring first. That will double the size of your > database. But when SQLite can get all of the information it > needs out of the index it does not bother to consult the

Re: [sqlite] speedtest result is obsolete

2005-02-08 Thread Chris Schirlinger
> Doing a keyed search is no guarantee that you won't touch *every* single > page in the table, if the rows are inserted in random order. Try this: ...cut... > Assuming key is the key field you want, the records will be inserted into > wibble in key order. Selecting by key will then touch the least

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Chris Schirlinger
> I did a small test to see if performance was linear with time. > I wanted to make sure it was suitable for my application. > It seems with both indexed and unindexed tables it doesn't take > significantly longer to do the 1,000,000th insert than it did the > first. I've discovered there are oodl

Re: [sqlite] speedtest result is obsolete

2005-02-07 Thread Chris Schirlinger
> I would be interested to know the results for very large data sets. > Indications on the list have been that performance suffers when the number > of records gets very big (> 1 million), possibly due to using an internal > sort. I must say, with a 2+ million row data set, we aren't getting a

Re: [sqlite] still struggling with "Database schema has changed" errors

2005-02-03 Thread Chris Schirlinger
> I am using SQLite 3.0.8 in a Win32 threaded > environment. > > I keep getting random "Database schema has changed" > errors even though I am using thread local > storage to make sure sqlite3_open() gets called > on each thread and a there is a sqlite3* per thread. > > Has anyone had any luck wi

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-03 Thread Chris Schirlinger
> Did you try www.aducom.com/sqlite, you can create it dynamically in your > code or use it as VCL-component. > It also works in Delphi6 > > Use the Database component and the Query component, you get a > tdataset-alike resultset. That's the one we were using initially that seemed slow. I trie

RE: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-03 Thread Chris Schirlinger
Tried to compile your wrapper this morning with no luck The code seems to be written with Delphi 7 or higher? We are still using delphi 6 which doesn't have the SysUtils data structure TFormatSettings, and the functions FormatDateTime have different declarations (only 2 paramaters) Those where

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-02 Thread Chris Schirlinger
No, the DLL wasn't the issue (heck the entire program is a DLL anyway and that's worked well for ages) We eventually discoverd through profiling the Delphi componants we had started using were the slow point, tossed them, and tried someone elses version (some stuff adapted by someone called Tim

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-02 Thread Chris Schirlinger
> H The fact that the freelist size is different > suggests either a bug in sqlite3_analyzer or a corrupt > database file. What does "PRAGMA integrity_check" say? It returned a batch of Page not used (from about 4 to 48 I think).\ That was it > What OS did you say you are using? Windo

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-02 Thread Chris Schirlinger
> > CREATE INDEX myMyIndex ON myTable (myKey); > > CREATE UNIQUE INDEX [pkPrimary] ON [myTable] ([myKey], [NumOne]); > > CREATE INDEX myNumOneIndex ON myTable (NumOne); > > Why did you chose these indexes? > Updates and Inserts are faster with fewer indices. > Perhaps they can be reduces? > > Yo

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-02 Thread Chris Schirlinger
> Out of curiousity, have you tried doing a plain INSERT instead of INSERT > OR REPLACE INTO? > Since you have no unique fields in your table, I'm not exactly sure how > or why you might get an > INSERT failure, but perhaps Sqlite is doing some sort of data comparison > on each insert. We have

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-02 Thread Chris Schirlinger
> The myMyIndex will only slow you down. myNumOneIndex > will help if you have queries that use the numOne column. Hurm, yes that makes sense. it wasn't supposed to be there, but was added just incase it helped, which it didn't > What is the output from sqlite3_analyzer? Unfortunatly didn't s

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-01 Thread Chris Schirlinger
Ok I hadn't toyed with those. Just tried it, the speed for queries hasn't increased much, but a little However, I started getting hard drive thrashes for 10+ seconds from time to time. Will investigate the cahce further to see what suits this app > Did you try increasing the page cache size. Y

Re: [sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-01 Thread Chris Schirlinger
> What speed were you expecting? > Are you comparing it to another database? If so what are the results for that > database? Anything better than what we got. The results are the worst we have gotton from any DB or any self rolled data system (Jet is better, het shouldn't be better) After more

[sqlite] Not getting the speed I think is possoble. Basic select statment slow?

2005-02-01 Thread Chris Schirlinger
I've got a 6 million row DB in SQLite 3, but getting... odd results which don't match up with the speed tests I've seen The statement: SELECT * FROM myTable WHERE myKey=1000 takes between 1 second to 4 or 5 on spikes. The returned result set is ~2000 records. I havn't seen more than 2000 recs/