Re: [sqlite] Need a wince test

2006-12-20 Thread drh
win95/nt/ce users, please test check-in [3541] to see if extension loading now works on wince and to make sure that nothing broke on win95/nt. Tnx. http://www.sqlite.org/cvstrac/chngview?cn=3541 -- D. Richard Hipp <[EMAIL PROTECTED]> ---

Re: [sqlite] Need a wince test

2006-12-20 Thread drh
Brodie Thiesfield <[EMAIL PROTECTED]> wrote: > > As far as I understand, sqlite changed sometime in the early 3.0 > versions such that char* strings (input and output) are always assumed > to be UTF-8. > [...] > > Yes. But this is a separate problem. Look at the code in os_win.c, e.g. > sqlite

Re: [sqlite] unable to open database file

2006-12-20 Thread drh
"Francesco Andrisani" <[EMAIL PROTECTED]> wrote: > Hi comunity, > i'm writing CGI pages (writeen in ANSI C) with SQLITE3 support, all work fine > using "SELECT" statement, but when i try to exec "UPDATE" or "INSERT" > statement i've the follow error: > > unable to open database file > > I've se

[sqlite] Need a wince test

2006-12-19 Thread drh
Can somebody with access to wince please test patch [3537] for me and let me know if it works to fix ticket #2023. http://www.sqlite.org/cvstrac/chngview?cn=3537 http://www.sqlite.org/cvstrac/tktview?tn=2023 -- D. Richard Hipp <[EMAIL PROTECTED]> ---

Re: [sqlite] delayed (batch) transactions

2006-12-19 Thread drh
Laszlo Elteto <[EMAIL PROTECTED]> wrote: > I DO need Durability, so I don't want to drop that. In fact, I need and want > normal transactional updates - just not immediately flushed to disk. If the information is not flushed to disk, how can it be durable? -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] delayed (batch) transactions

2006-12-19 Thread drh
Laszlo Elteto <[EMAIL PROTECTED]> wrote: > I've started to use SQLite and it works fine - except for performance. The > application gets requests (possibly from many users) and does a few > transactions on the database. (eg. create a context for the request; later > it may be updated and when the u

Re: [sqlite] Query Optimizer and INTEGER PRIMARY KEY

2006-12-19 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > Jesús López wrote: > > Given the table: > > > > CREATE TABLE Posts ( > > PostID INTEGER PRIMARY KEY, > > CategoryID INT NOT NULL > > ) > > > > And the index: > > > > CREATE UNIQUE INDEX IX_Posts (CategoryID, PostID) > > > > Your create index stateme

Re: [sqlite] Is there a method for doing bulk insertion?

2006-12-18 Thread drh
"Anderson, James H \(IT\)" <[EMAIL PROTECTED]> wrote: > or do I have to creation a gazillion insert statements? > The sqlite3 command-line shell has a ".import" command which can be used to read CSV data. But the way this works internally is that the command-line shell constructs an INSERT s

Re: [sqlite] Calculate years and months difference with Julian Date?

2006-12-18 Thread drh
[EMAIL PROTECTED] wrote: > I think it was the date format in the SQLite table that wasn't right. > I had this as dd-mm- > > Doing SELECT date('2006-02-16','+1 month') > gives me indeed correctly 16 Feb 2006 > > So does the format have to be -mm-dd ? > Yes. That format is called ISO-86

Re: [sqlite] Calculate years and months difference with Julian Date?

2006-12-18 Thread drh
[EMAIL PROTECTED] wrote: > Unfortunately, it looks that just adds 30 days, so 16 Feb 06 will give 18 > March 06 etc. > SELECT date('2006-01-16','+1 month'); yields 2006-02-16. You must have typed something wrong. -- D. Richard Hipp <[EMAIL PROTECTED]> ---

Re: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Is it possible with Julian dates in 2 fields to calculate the months and/or > years difference between those 2 dates? > > I know I can subtract the 2 dates and divide by 30 (or 30.42) or 365 and > take it from there, but I would like it a bit more precis

Re: [sqlite] building sqlite on windows in Unicode

2006-12-16 Thread drh
Brodie Thiesfield <[EMAIL PROTECTED]> wrote: > Done. Is there anything else that is necessary to contribute code and > patches to sqlite? For ticket #2023, the first patch seems unlikely to work right since it changes the character encoding for LoadLibrary() but leaves it unchanged for FreeLibra

Re: [sqlite] disk I/O error writing files mounted via samba

2006-12-14 Thread drh
Guy Hindell <[EMAIL PROTECTED]> wrote: > I would like to use sqlite (v3.3.8) on a linux box (fedora core 5) to > read/write a database file in a directory which is actually on a windows > share mounted via samba/cifs. I can open the file, and read from it, but > writing produces "disk I/O error"

Re: [sqlite] count up how much an free space on DB

2006-12-14 Thread drh
Artem Yankovskiy <[EMAIL PROTECTED]> wrote: > Question, whether probably to count up how much an > free space there is in this a DB? > If the first byte of the database file is called byte 0, then bytes 16 and 17 form a 16-bit big-endian integer which is the number of bytes per page. Bytes 36-39

Re: [sqlite] Copy Table Values

2006-12-12 Thread drh
Rich Shepard <[EMAIL PROTECTED]> wrote: > I want to copy field values for two columns in one table into the > equivalent columns in another table. I don't find a 'select ... into' option > in the web page syntax for the command. How should I go about doing this > data copy? > INSERT INTO ... SELE

Re: [sqlite] sqllite ddb from win to linux

2006-12-12 Thread drh
"Rob Coenen" <[EMAIL PROTECTED]> wrote: > yes that is what I tried; I did use sqlite3 > does not work. Any known problems on moving db files from Win to Linux? > SQLite database files are cross-platform. They work on linux, windows, mac, various embedded platforms, etc. Byte order does not matt

Re: [sqlite] sqllite ddb from win to linux

2006-12-12 Thread drh
"Rob Coenen" <[EMAIL PROTECTED]> wrote: > hello all, > > I have been using TRAC for Windows and I need to restore the TRAC wiki on a > Linux machine. > > The integrated Trac WIKI is stored in a sqlite file, it seems as sqlite > version 3 (judging by opening the .db file with a HEX editor, the hea

Re: [sqlite] Operation is not allowed when the object is closed

2006-12-09 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Keep getting this error when trying to create a table in SQLite. There is a > valid connection object and it is open and I have no idea what is causing > this: > > Operation is not allowed when the object is closed. > Error number: 3704 > Ain't no such

Re: [sqlite] sqlite3_column_double - problems when assigning values to variable

2006-12-09 Thread drh
Marten Feldtmann <[EMAIL PROTECTED]> wrote: > John Stanton schrieb: > > Maybe your statement does not reference a valid row. > > > No, actually I have in my test program several lines to retrieve > the values in different ways: > >sql = "select aColumn from TESTME2;"; > sqlite3_open("c:\\s

Re: [sqlite] doing everything sqlite warns against

2006-12-09 Thread drh
"Hickey, Larry" <[EMAIL PROTECTED]> wrote: > I have a system requirement that feeds thousands of keyed records, each of > which contains a blob of around a meg or so into an sqlite database. Ok so > far. But the records come from multiple > processes, and I can't afford to do have commits after eac

Re: [sqlite] Unicode Help

2006-12-07 Thread drh
"Da Martian" <[EMAIL PROTECTED]> wrote: > When using the > NON16 version of prepare: > If I add text which is in UTF16 what happens? > > 16 Version: > If I add UTF16 text what happnes? > if I add UTF-8 Text what happens? > if I add ASCIII text what happnes? > You seem really confused about the

Re: [sqlite] database permanently locked

2006-12-03 Thread drh
Max Barry <[EMAIL PROTECTED]> wrote: > My database is permanently locked, and I've spent two fruitless days > trying to unlock it. > > The problem: > > $ sqlite trac.db > SQLite version 3.3.6 > Enter ".help" for instructions > sqlite> .databases > Error: database is locked > Is the database on

Re: [sqlite] How do I speed up CREATE INDEX ?

2006-12-03 Thread drh
"Mohd Radzi Ibrahim" <[EMAIL PROTECTED]> wrote: > Hi, > I was loading a file to sqlite (3.3.8), and it took 4 mins to load 6 million > rows (with no index). But then when I run CREATE INDEX it took me 40 mins to > do that. What could I do to speed up the indexing process ? > The reason index cr

Re: [sqlite] compiler option SQLITE_OMIT_SQLITE_OMIT_PARSER

2006-12-01 Thread drh
"Noah Hart" <[EMAIL PROTECTED]> wrote: > Thank you, so as I understand it, the option SQLITE_OMIT_PARSER mean > that I've already parsed the statements, and are not supporting "ad-hoc" > SQL. > > What about the compiler option SQLITE_OMIT_CHECK > CHECK constrants. -- D. Richard Hipp <[EMAIL PR

Re: [sqlite] When to run analyze?

2006-12-01 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > > And also the output of running sqlite3_analyzer on your database > > Have run that now and the output looks impressive, although I have no idea > yet how to use it. Output file is 72 Kb. Shall I send it as an attachement > to this user-group? > Direc

Re: [sqlite] compiler option SQLITE_OMIT_SQLITE_OMIT_PARSER

2006-12-01 Thread drh
"Noah Hart" <[EMAIL PROTECTED]> wrote: > > However, I cannot find what is the purpose of the compiler option > SSQLITE_OMIT_PARSER > > Clearly it "Omits" the "Parser", but my real questions are: > what is the purpose of the parser. > What are the ramification of omitting it from sqlite? > SQLit

Re: [sqlite] When to run analyze?

2006-12-01 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Having a reasonably big SQLite database, 21 tables, one table with some > millions of rows, overall file size about 1.3 Gb. This table will only get > SELECT statements once it has been created. I have now run analyze on this > file and it does speed quer

Re: [sqlite] When to run analyze?

2006-12-01 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Having a reasonably big SQLite database, 21 tables, one table with some > millions of rows, overall file size about 1.3 Gb. This table will only get > SELECT statements once it has been created. I have now run analyze on this > file and it does speed quer

Re: [sqlite] for what reason :memory: is much slower than /dev/sh m/dummy.db

2006-12-01 Thread drh
[EMAIL PROTECTED] wrote: > > > > It uses exactly the same algorithm. It is just that the hash > > tables are fixed sized and are designed for a cache, not for > > an entire database. > > Does this mean, that if i use :memory: databases, the cache-layer of = > sqlite > is disabled? > No. It me

Re: [sqlite] for what reason :memory: is much slower than /dev/shm/dummy.db

2006-12-01 Thread drh
John Stanton <[EMAIL PROTECTED]> wrote: > > I understand that Sqlite uses a less efficient algorithm for :memory > files than for the cacheing on regular files and that means lower > performance on those memory DBs. > It uses exactly the same algorithm. It is just that the hash tables are fix

Re: [sqlite] Preallocating fixed disk space for database ...

2006-12-01 Thread drh
"kamil" <[EMAIL PROTECTED]> wrote: > I want to preallocate disk space for database. I have only one table with ~1 > milion entries, each entry takes about 30 bytes. Entries are added/removed > but there is some maximum number of items, which can be put into the table > at the same time. Is it po

Re: [sqlite] strange last_insert_rowid()

2006-12-01 Thread drh
Inoqulath <[EMAIL PROTECTED]> wrote: > > Here's the Code: > > BEGIN TRANSACTION; > [] > COMMIT; > > When I do a "SELECT tag FROM vw_last_insert_language_tag" I think 5 > should be returned (since there are 5 INSERTS with 5 autoinc'd), but I > receive 1 as result. Is there anything else I h

Re: [sqlite] sqlite_open

2006-11-30 Thread drh
John Stanton <[EMAIL PROTECTED]> wrote: > Unix has an API call which establishes > file existance efficiently. On Windows I recall that I had to open it. > SQLite contains the sqlite3OsFileExists(const char *zFilename) function that is cross-platform. Since this function does not begin with "s

Re: [sqlite] Size of INDEX in database

2006-11-30 Thread drh
Dr Gerard Hammond <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a SELECT call I can issue to the SQLite engine to determine > the number of bytes that INDEXs occupy. No. But you can download the sqlite3_analyzer utility from http://www.sqlite.org/download.html and use it to get detailed measure

Re: [sqlite] REPLACE INTO Only Executes last SELECT?

2006-11-30 Thread drh
Clark Christensen <[EMAIL PROTECTED]> wrote: > I don't think SQLite supports "REPLACE INTO..." I'm pretty sure "REPLACE" = > is a conflict action in SQLite. > > Perhaps "INSERT OR REPLACE INTO Memb= > erAccounts (MemberId, Balance) SELECT..." will do what you want? > I went to the extra troub

Re: [sqlite] problem with Triggers

2006-11-30 Thread drh
chetana bhargav <[EMAIL PROTECTED]> wrote: > Hi, > > I was trying out to test some trigger stuff, basically > if I have 2 connections open, and one of the connection > registered a user defined function to be invoked. Now > when the other connection inserts into table was trying > to see if the

Re: [sqlite] How safe is sqlite3_prepare compared to sqlite3_exec?

2006-11-30 Thread drh
Thomas Zangl <[EMAIL PROTECTED]> wrote: > > I am quite sure that my version is safe Famous last words. :-) -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Query on database operations.

2006-11-30 Thread drh
"Kalyani Tummala" <[EMAIL PROTECTED]> wrote: > > Heap memory is highly variant on size and number of records. I tried > modifying the page size(SQLITE_DEFAULT_PAGE_SIZE and > SQLITE_MAX_PAGE_SIZE ) in pager.h from 512 to 2048 but found no > reduction in heap size. > Try changing SQLITE_DEFAULT_

Re: [sqlite] Powered-by Images?

2006-11-29 Thread drh
"Da Martian" <[EMAIL PROTECTED]> wrote: > Hi > > Are there any powered by images for SQLite3? > A search for 'powered by sqlite' on google images turned up two candidates for me. Both seem adequate, though neither is great. You want to make a new and better one and contribute it to the project

Re: [sqlite] Detached database still owned by process

2006-11-29 Thread drh
"Anders Holmberg" <[EMAIL PROTECTED]> wrote: > Hi > > I am using sqlite (version 3.3.7) on Windows and I am loading one database > (stored in a file) into another database (:memory:) using the attach / > detatch scheme described on the sqlite site. > > My problem is that sqlite keeps hanging on t

Re: [sqlite] Query

2006-11-29 Thread drh
[EMAIL PROTECTED] wrote: > > "SELECT * from database where STRING1 = 'x' && STRING2 = 'y' && STATE = 1 > && purpose = 'z'" > "Create INDEX INDX on database( STRING1, STRING2, state, purpose)" > > i) > If above index is present then the SELECT statement given, > iterates to the all ro

[sqlite] Indexing LIKE. Was: case insensitivity

2006-11-28 Thread drh
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote: > Dixon Hutchinson > wrote: > > Sorry, meant to include a reference to 'p' in my select: > > SELECT * FROM foo WHERE bar LIKE 'something' AND p='some_int'; > > An expression involving LIKE cannot use an index anyway. This is mostly true, but there are

Re: [sqlite] case insensitivity

2006-11-28 Thread drh
Dixon Hutchinson <[EMAIL PROTECTED]> wrote: > I have an SQLite db with one TEXT column. That column and an INTEGER > column (not the rowid as this column is definitely not unique by itself) > are declared UNIQUE together. > > CREATE TABLE foo ( > bar TEXT, > p INTEGER, > rowid INTE

Re: [sqlite] sqlite3 and threads ...

2006-11-28 Thread drh
Marten Feldtmann <[EMAIL PROTECTED]> wrote: > I've read the book from Michael Owens about SQLite and also > read the parts about threads and sqlite3. > > Actually it seems to be possible to use the same connection > handler from different threads - but within a transaction > only one thread is all

Re: [sqlite] Roll-back

2006-11-28 Thread drh
[EMAIL PROTECTED] wrote: > Hi, > > how can I 'roll-back' some modifications done by some previous sql > statements with SQLite? > The ROLLBACK command will undo everything from within a transaction, assuming you have not already committed the transaction. Once a transaction commits, there is n

Re: [sqlite] A database corrupting case to report

2006-11-28 Thread drh
"Zhang Cheng-E7104C" <[EMAIL PROTECTED]> wrote: > Hi,Richard > The cases happens in PC. The disk remained is not much, sorts of several = > hundreds of Mb . > > Then the following step is what I do. > > 1) Create a 1M bytes size file. > 2) create a table and begin to insert data in the table unt

Re: [sqlite] Cross-compiling sqlite fails

2006-11-27 Thread drh
"Alon Keren" <[EMAIL PROTECTED]> wrote: > > The cross-compilation I'm currently trying is from x86 architecture to > x86 architecture, as I'm interested just to see that cross-compilation > of sqlite can work. > All of the Win32 binaries on the SQLite download site are cross-compiled on a Linux

Re: [sqlite] sqlite 3.3.8 and OpenWatcom ?

2006-11-27 Thread drh
Marten Feldtmann <[EMAIL PROTECTED]> wrote: > Has anyone compiled sqlite 3.3.8 under OpenWatcom 1.x ? I'm not > able to do it, because of this: > > void (*interrupt)(sqlite3*); > > in sqlite3ext.h ... seems to be, that interrupt is a reserved word > in OpenWatcom, but this is just a guess ...

Re: [sqlite] A database corrupting case to report

2006-11-27 Thread drh
"Zhang Cheng-E7104C" <[EMAIL PROTECTED]> wrote: > Database Corrupt cases: > Tested on PC > > Steps > > 1) Inserted table to full disk and Reserved 1M space in disk > 2 )Release the reserved space I do not understand what you mean by the previous two steps. Can you pleae provide more detail. >

Re: [sqlite] caching

2006-11-25 Thread drh
<[EMAIL PROTECTED]> wrote: > > when an update or delete is made to the database all > queries that are possibly affected are requeried and > cached again rather than being removed, once every 20 > updates/deletes a clean up routine is invoked. I see many problems here: * It fails if your up

Re: [sqlite] How to take off a lock on a table

2006-11-25 Thread drh
Salvador Ramirez <[EMAIL PROTECTED]> wrote: > Hello, > > I am having a problem with a table on a sqlite3 database > related with a lock that left by a program that died > abnormally in the middle of a select operating initiated > with a call to sqlite3_prepare(). Now I wonder how to take >

Re: [sqlite] Create table / data types

2006-11-19 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > I can see that doing this: > > create table ReadCode > (SUBJECT_TYPE varchar > READ_CODE varchar > TERM30 varchar > TERM60 varchar); > > Seems to work just the same as does this: > > create table ReadCode > (SUBJECT_TYPE text >

Re: [sqlite] Create table / data types

2006-11-19 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > > Also, how would I translate these data types of Interbase to SQLite data > types: > > I take it that it will be like this: > > BLOB > BLOB > DATE > TEXT > DOUBLE> REAL > LONG > INTEGER > SHORT > REAL Did you mean "SHORT > INTE

Re: [sqlite] Database sync

2006-11-18 Thread drh
"Isaac Raway" <[EMAIL PROTECTED]> wrote: > > At any rate, anyone have experience syncing SQLite DB files? > I have done this on two separate projects. In the first case, the databases to be synced all had a fixed set of records (a few hundred thousand rows). New rows were never added or delete

Re: [sqlite] Design of application using embedded database

2006-11-17 Thread drh
[EMAIL PROTECTED] wrote: > Hi, > I would like a bit of advice before starting to make changes to my > application. > > I've written a program in C# for personnel departments and at present all of > the data is stored in memory until the user saves and then it is written to > disk as an XML file. >

Re: [sqlite] SQLITE readonly Performance on a CD DB

2006-11-15 Thread drh
[EMAIL PROTECTED] wrote: > I have 300K records in my database and the blob text file (invoices) in = > a separate database. I query the database over a network or USB stick an= > d the performance is good. However when I moved my database to CD media,= > the performance dropped drastically. It tak

Re: [sqlite] question about search string

2006-11-15 Thread drh
Florin Serbanescu <[EMAIL PROTECTED]> wrote: > Hello, > > I have a string that contains a full path of a file > for example. Also I have a table in Sqlite that > contains a column name 'command' that has only the > filename. My question is how I can create a query so I > can retrieve all rows wher

Re: [sqlite] Query planner confusion

2006-11-14 Thread drh
Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > I've hit a case where SQLite is selecting a suboptimal index for my query and > I want to do something to tell it to use a different index. I'm familiar > with the "+" trick to confuse the optimizer but I can't see how it would > apply to this ca

Re: [sqlite] Migration from sqlite2 to sqlite3 -> no tablename in p3 of Open* rows when explaining sql?

2006-11-14 Thread drh
"Mario Wolff" <[EMAIL PROTECTED]> wrote: > Hello Group, > i try to migrate my (alpha-state) project from sqlite2 to sqlite3. To > realize table based acl's i call explain and take the > OpenRead/OpenWrite lines and check for p3 entry which gives the > affected table. With sqlite3 the p3 is not set!

Re: [sqlite] LEFT OUTER JOIN + INNER JOIN problem

2006-11-14 Thread drh
[EMAIL PROTECTED] wrote: > =?UTF-8?B?R8OhYm9yIEZhcmthcw==?= <[EMAIL PROTECTED]> wrote: > > > > select * from role > > LEFT OUTER JOIN person_role on role.id = person_role.role_id > > INNER JOIN person on person_role.person_id = person.id Your work-around is to say "CROSS JOIN" here instead of "IN

Re: [sqlite] Database Corruption and fix suggsted

2006-11-14 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > > 2.) I compiled sqlite 2.8.13 for a proprietary platform that we are using for > development(little endian) and ran sqlite binary on the directory that had > the journal also. > > RESULT: > --- > The file is getting corrupted. > > > Please can y

Re: [sqlite] LEFT OUTER JOIN + INNER JOIN problem

2006-11-14 Thread drh
=?UTF-8?B?R8OhYm9yIEZhcmthcw==?= <[EMAIL PROTECTED]> wrote: > > select * from role > LEFT OUTER JOIN person_role on role.id = person_role.role_id > INNER JOIN person on person_role.person_id = person.id > WHERE person.id=1; > > 5|admin|1|5|1|john > 6|devel > > i think it should only output t

Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi Richard, > I downloaded the sqlite-2.8.17.bin from sqlite.org (sqlite-2.8.17.bin.gz) > and ran it on media.vdb.corrupt. I am getting the following error . I am > confused how were you able to open this file. Plz open media..vdb.corrupt. > Once a

Re: [sqlite] so many warnings on vc6 with warning level 4

2006-11-13 Thread drh
Gunnar Roth <[EMAIL PROTECTED]> wrote: > Hello, > i want to use sqlite3 in a sub-project at work. > when compiling with warning level 4 with vc6 ( internal philosophy ) , i > get over 480 warnings. With warning level 3 there are still 119 left. > This leads to problems to convince the project lead

Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using sqlite 2.8.13 which is supposed to have fix for "Corrupt > problem encountered on Windows NT platform" check this > (http://www.sqlite.org/cvstrac/tktview?tn=599). But the code in pager.c still > has the following rc = write32bits

Re: [sqlite] Journal file corrouption on power failure .

2006-11-10 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > I have set PRAGMA synchronous=FULL; > Do your power-off-corruption thing and send me copies of both the journal file and the original database and I will see what I can find. -- D. Richard Hipp <[EMAIL PROTECTED]> --

Re: [sqlite] Journal file corrouption on power failure .

2006-11-10 Thread drh
"jayanth KP" <[EMAIL PROTECTED]> wrote: > Hi, > >I have a question regarding powerfailure. I am using sqlite version 2.8.13 > . I am seeing that the database is getting corrupted after power failure > during delete database entry operation. > > Try setting PRAGMA synchronous=FULL; --

Re: [sqlite] Is it bad to...

2006-11-09 Thread drh
"David Gewirtz" <[EMAIL PROTECTED]> wrote: > > Basically, is it bad if I decide to open and close the same database a LOT? It isn't the best choice if performance is your goal. Every time you open the database, it has to read and parse the entire schema. SQLite does that pretty quickly as databa

Re: [sqlite] Q about new SQLite API

2006-11-07 Thread drh
"Klemens Friedl" <[EMAIL PROTECTED]> wrote: > > Btw. are there plans to implement grouping operator (i.e. parentheses) > and a real "NOT" (not just "exclude") features in "Fts Two" ? > Maybe and no. -- D. Richard Hipp <[EMAIL PROTECTED]> ---

[sqlite] Q about new SQLite API

2006-11-07 Thread drh
I'm working on a new API routine for SQLite and I have questions for the community. The working name of the new api is sqlite3_prepare_v2(). sqlite3_prepare_v2() works like sqlite3_prepare() in that it generates a prepared statement in an sqlite3_stmt structure. The differences is in the behavior

[sqlite] OS/2 port busted?

2006-11-06 Thread drh
Check-in [3503] at http://www.sqlite.org/cvstrac/chngview?cn=3503 seems likely to have broken the OS/2 port. But since I know nothing about OS/2, I'm unable to fix it. If anyone would care to contribute a patch, I'll be glad to fold it it. I didn't test the changes that were made to the win32 po

Re: [sqlite] Query Execution speed.

2006-11-03 Thread drh
Christian Smith <[EMAIL PROTECTED]> wrote: >> > Version 2 used a Red/Black balanced tree in :memory:, whereas version 3 > appears to have done away with this optimisation. I'm curious as to why? > It is simpler to support a single algorithm (b-trees) rather than two (b-tree + red/black trees).

Re: [sqlite] Sqlite DB file sizes

2006-11-02 Thread drh
Dave Gierok <[EMAIL PROTECTED]> wrote: > How difficult would it be to change my version of Sqlite such that it uses = > 32-bit floats instead of doubles for REAL values in memory? Could you poin= > t me in the right direction? We are in a real shortage for RAM in our game= > .. The routines you'

Re: [sqlite] smaller sqlite execuatble?

2006-11-01 Thread drh
tim <[EMAIL PROTECTED]> wrote: > > I would be very curious to know how exactly you leave out optional features. > Compiler command-line options. Ex: -DSQLITE_OMIT_TRIGGER=1 Here are all of the options: SQLITE_OMIT_ALTERTABLE SQLITE_OMIT_ANALYZE SQLITE_OMIT_AUTHORIZATION SQLITE_O

Re: [sqlite] Sqlite DB file sizes

2006-11-01 Thread drh
Dave Gierok <[EMAIL PROTECTED]> wrote: > So, how is data represented in a :memory: db? Are :memory: db's different = > in the way they store their data in memory vs. the way a file db stores its= > data to file? Or is it as simple as instead of writing to file, it writes= > to memory? If they

Re: [sqlite] smaller sqlite execuatble?

2006-11-01 Thread drh
tim <[EMAIL PROTECTED]> wrote: > Hi, > > I'm developing on an arm-elf platform that uses a flat binary (elf2flt) > (mmu-less processor) and the smallest executable I'm able to generate > runs about 599k. Also it tends to want an equal amount of memory at > run-time, which the board > will not su

Re: [sqlite] Sqlite DB file sizes

2006-11-01 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Dave Gierok <[EMAIL PROTECTED]> wrote: > > > >> It looks like the size of a Sqlite DB ends up being much larger > >> (more than 2x) than size that I calculate for its data set. > >> > >> A simple test shows that when creating

Re: [sqlite] Sqlite DB file sizes

2006-11-01 Thread drh
Dave Gierok <[EMAIL PROTECTED]> wrote: > It looks like the size of a Sqlite DB ends up being much larger > (more than 2x) than size that I calculate for its data set. > > A simple test shows that when creating one table with one integer > column and filling it with 1 rows, I get a DB size of

Re: [sqlite] Did I Corrupt My Fedora Core 5 Yum Database?

2006-11-01 Thread drh
Robert L Cochran <[EMAIL PROTECTED]> wrote: > I believe I overwrote my Fedora Core 5 version of sqlite (that's > 3.3.3-1.2.x86_64) for the second time this year. I downloaded > sqlite-3.3.8 and compiled it with this configure string: > > ../configure --prefix=/usr/local/sqlite-3.3.8 --libdir=/u

Re: [sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > Roger Binns wrote: > > > > The usual approach is to write a web page about it and then publish a > > story on Slashdot. > > > I have to second this idea. It worked well for Poul-Henning Kamp. > OK. Thanks everybody for your support. But let's try to de

Re: [sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread drh
[EMAIL PROTECTED] wrote: > On Tue, 31 Oct 2006 [EMAIL PROTECTED] wrote: > > > > http://www.sqlite.org/cvstrac/tktview?tn=2049 > > > > Does anybody have an suggestions on how I might deal > > with this? Does anybody know how I can get in touch > > with an engineer at Mcafee so that we can at least

[sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread drh
I need advice from the community. The problem is seen here: http://www.sqlite.org/cvstrac/tktview?tn=2049 http://www.sqlite.org/cvstrac/tktview?tn=1989 http://www.sqlite.org/cvstrac/tktview?tn=1841 http://www.sqlite.org/cvstrac/wiki?p=McafeeProblem It appears that McAfee Anti-Virus uses

Re: [sqlite] strange issue with broken links/hung processes in transaction

2006-10-31 Thread drh
[EMAIL PROTECTED] wrote: > i have some code which uses sqlite heavily. every so often a command using > with hang indefinitely, running an strace on the code shows it to be stuck in > a loop doing > > >munmap addr1 >mmap #=> addr1 >munmap addr2 >mmap #=> addr1 >

Re: [sqlite] What is the proper use of threads?

2006-10-31 Thread drh
=?ISO-8859-2?Q?Zimmer_Andr=E1s?= <[EMAIL PROTECTED]> wrote: > > Maybe my mistake but I haven't found a notice in the docs that says I > mustn't use SQLite from within a signal handler... Is there any known > workaround to this? > A single handler is like a separate thread. You can call SQLit

Re: [sqlite] Indexes analysis

2006-10-31 Thread drh
chetana bhargav <[EMAIL PROTECTED]> wrote: > > And regarding EXPLAIN QUERY METHOD, I seem to be getting some error. It just > says, > > "0|0|TABLE table_acc WITH INDEX IDX_ACC_ID_STATE" > This is not an error. It is the output of EXPLAIN QUERY PLAN. This says that you are reading the table

Re: [sqlite] What is the proper use of threads?

2006-10-31 Thread drh
=?ISO-8859-2?Q?Zimmer_Andr=E1s?= <[EMAIL PROTECTED]> wrote: > > However, at random times I keep getting "library routine called out of > sequence" errors (in the feeder). This is the SQLITE_MISUSE error. You can grep for SQLITE_MISUSE in the source code to find all the cases where this error c

Re: [sqlite] password on database, can i have?

2006-10-30 Thread drh
"=?UTF-8?Q?R=C3=BAben_L=C3=ADcio?=" <[EMAIL PROTECTED]> wrote: > I need protect my database with a password, can i do it??? > http://www.hwaci.com/sw/sqlite/prosupport.html#crypto -- D. Richard Hipp <[EMAIL PROTECTED]> ---

Re: [sqlite] Memory Usage 2

2006-10-30 Thread drh
Ben Clewett <[EMAIL PROTECTED]> wrote: > > Is the allocation of 4108 KB normal for Sqlite? No. Not for me. If you open the same database using the command-line client, how much memory does it use? > Why, then run from xined, is the memory allocation four times as much? > Why is just Sqlite eff

Re: [sqlite] Using SQLite to record Web log file data (a threading question)

2006-10-29 Thread drh
"David Gewirtz" <[EMAIL PROTECTED]> wrote: > I've been exploring SQLite for a number of applications, but one I'd like to > embark on soon is using SQLite to record Web site log file data, so I can > perform SQL-based analysis on my logs, rather than using some thing like > Analog. > > Unfortunate

Re: [sqlite] serious performance problems with indexes

2006-10-27 Thread drh
Peter De Rijk <[EMAIL PROTECTED]> wrote: > I have run into a serious performance problem with tables with many rows. > The problem only occurs on tables with an index > The time needed for an insert into a table with an index is dependend on the > number of rows. I have not formally checked, but f

Re: [sqlite] Benefits to use of "NOT NULL" where possible?

2006-10-27 Thread drh
"Scott Hess" <[EMAIL PROTECTED]> wrote: > In some database systems, it can be beneficial to use "NOT NULL" as > much as possible when defining tables. It usually allows for a > slightly tighter storage encoding, and also allows some optimizations > to occur. > > AFAICT, in sqlite it only seems im

[sqlite] command-line shell handling of errors.

2006-10-26 Thread drh
In previous versions of SQLite, when the command-line shell encountered an error, it would print an error message but continue processing its input. This seems wrong. In response to ticket #2045, I changed the command-line shell so that when it is reading from a file, it stops reading whenever

Re: [sqlite] any data access and retrieval engine?

2006-10-25 Thread drh
"Sarah" <[EMAIL PROTECTED]> wrote: > Hi, John Stanton > > I really really appreciate your warm help. > That's great if you can send me the codes of B tree and B+ tree. > Many thanks in advance. > > My requirements for data access are as follows: > -all the data are stored in non-volatile memory

Re: [sqlite] Potential corruption bug in 2.8.17. Patch attached.

2006-10-24 Thread drh
[EMAIL PROTECTED] wrote: > >> > >> --- vdbe.c~2005-12-19 12:42:25.0 -0500 > >> +++ vdbe.c 2006-10-22 16:32:45.0 -0400 > >> @@ -2937,7 +2937,7 @@ > >>if( pOp->p2 & OPFLAG_NCHANGE ) db->nChange++; > >>if( pOp->p2 & OPFLAG_LASTROWID ) db->lastRowid = pNos->i; >

Re: [sqlite] memroy footprint for mobile phone

2006-10-24 Thread drh
"weiyang wang" <[EMAIL PROTECTED]> wrote: > hi, > > i am working on the sqlite evaluation for mobile phone. and now i am facing > the issues of memory footprint. > > according to the documents, three parameters are used to control the memory > footprint: default_cache_size, cache_size and page_si

Re: [sqlite] Potential corruption bug in 2.8.17. Patch attached.

2006-10-24 Thread drh
[EMAIL PROTECTED] wrote: > This was likely a typo. In its current state, it's accessing uninitialized > memory. It looks like it's conceivable that an incorrect nextRowid could be > later used if the uninitialized value happens to be a small integer (smaller > than pC->nextRowid) and the "valid"

Re: [sqlite] Regarding sqlite3_exec

2006-10-24 Thread drh
"Da Martian" <[EMAIL PROTECTED]> wrote: > Hi > > > >The optimal way is that you prepare the statement, fetch and > > count the results with sqlite3_step. > > How would I "fetch and count" the results via sqlite3_step? > > Do you mean fetch all the records first? What if my result set is huge, a

Re: [sqlite] encrypted file

2006-10-24 Thread drh
Lloyd <[EMAIL PROTECTED]> wrote: > Hi List, > Whether the data base which we create through the program will be in > encrypted form? The public-domain version of SQLite does not encrypt the data. But commerical extensions that encrypt the data are available. See, for example, http://www.hwaci.co

Re: [sqlite] insertion time

2006-10-24 Thread drh
Lloyd <[EMAIL PROTECTED]> wrote: > Hi, > When this 3M inserts are performed, it takes 130 more seconds compared > to the actual application running time. The actual application run time > is 20 seconds but when this 3M inserts are performed it takes 150 > seconds. > > Is there any way to reduce

Re: [sqlite] blob vs. string in bound parameters

2006-10-23 Thread drh
Andy Ross <[EMAIL PROTECTED]> wrote: > > > SQLite takes the approach of always making every BLOB larger than > > every TEXT string. That is simple and unambiguous. > > but it's a disaster for people like me trying to actually take > advantage of the manifest typing feature. I have an (IMH

<    4   5   6   7   8   9   10   11   12   13   >