[sqlite] Function patternCompare() not EBCDIC friendly

2015-12-31 Thread David Clark
Roland,
Congrads on getting something to work with sqlite and z/OS. ?How did you 
resolve the file I/O issues, or did you have any. ?I figured sqlite should be 
able to run on z/OS a few years back due to the portable nature of the code I 
saw. ? But the?mainframe guys who supposedly knew, told me...no things like 
_lseek() not present on a mainframe, then started talkingabout mainframe stuff 
I didn't follow, being from the windows world. ?
So what is the state of sqlite on z/OS and how close is to drop in and compile 
with a c compiler and run? ?? 

On Wednesday, December 30, 2015 11:32 AM, John McKown  wrote:



 On Wed, Dec 30, 2015 at 9:55 AM, Roland Martin 
wrote:

> I have tested the code change on z/OS and it works.
>

?Any chance that I could beg the source and executable code from you?


>
> Thanks for the quick turnaround!
>
> Roland Martin
>
>
-- 
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users






[sqlite] field length retreval

2014-04-17 Thread David Clark
If I have a table of 
field1 varchar(25)
field2 varchar(50)
field3 varchar(75)

I know sqlite does not enforce limits, but in my program it would be useful if 
I could find the declared lengths of
25, 50 and 75 in this case.  How might I do that in sqlite?

Thank you,
David Clark
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-30 Thread David Clark
pied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_hash.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_hash.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_icu.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_porter.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_tokenizer.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_tokenizer.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_tokenizer1.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3Int.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_aux.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_expr.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_hash.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_hash.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_icu.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_porter.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_snippet.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_tokenizer.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_tokenizer.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_tokenizer1.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_tokenize_vtab.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_unicode.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_unicode2.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s3\fts3_write.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ic
u\sqliteicu.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ic
u\icu.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\rt
ree\rtree.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\rt
ree\rtree.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y keywordh
ash.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y opcodes.
c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y opcodes.
h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y parse.c
tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y parse.h
tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y sqlite3.
h tsrc
        1 file(s) copied.
        del /Q tsrc\sqlite.h.in tsrc\parse.y
        tclsh85 .\tool\vdbe-compress.tcl < tsrc\vdbe.c > vdbe.new
        move vdbe.new tsrc\vdbe.c
NMAKE : fatal error U1045: spawn failed : No error
Stop.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>
I did install gawk and tcl85 for windows  to get this far.  Any ideas...anybody?

I did try the make sqlite3-all.c on the other link.  But my system does not find
make.exe.  nmake.exe is found just fine.



On Tuesday, October 29, 2013 3:02 AM, Dominique Devienne <ddevie...@gmail.com> 
wrote:
 
On Mon, Oct 28,

[sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-28 Thread David Clark
I am trying to compile the source tree on visual studio with makefile.msc and I 
get the following:
C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>nmake -B -f make
file.msc | more

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        copy .\src\lempar.c .
        1 file(s) copied.
        cl -W3 -MD -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -Od -Zi -Daccess=_access
 -Felemon.exe .\tool\lemon.c /link
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

lemon.c
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

/debug
/out:lemon.exe
lemon.obj
        del /Q parse.y parse.h parse.h.temp
        copy .\src\parse.y .
        1 file(s) copied.
        .\lemon.exe  -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENA
BLE_COLUMN_METADATA=1 -DSQLITE_MAX_TRIGGER_DEPTH=100  parse.y
        move parse.h parse.h.temp
NMAKE : fatal error U1045: spawn failed : No error
Stop.


C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>

Why am I doing this:
I have a database lock error coming from a update query and I am not sure why.  
So I want to debug into it...but debugging into
a file bigger than 65000 lines does not work at all on visual studio 2008.  

Thank you for any advice.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
This has been resolved...solution:
1) use gcc not g++.
2) grab the lastest source from sqlite.org.  There was a version update in 
doing that.  But now it seems good on both
operating systems.  

Thank you,

David Clark



>
> From: Michael Black <mdblac...@yahoo.com>
>To: 'David Clark' <quincy...@yahoo.com>; 'General Discussion of SQLite 
>Database' <sqlite-users@sqlite.org> 
>Sent: Wednesday, January 30, 2013 9:30 AM
>Subject: RE: [sqlite] Sqlite ubuntu 12.10 compile/install
> 
>Use the amalgamation:
>
>cc -O -c sqlite3.c
>
>Then link it into your program.  Most of us recommend avoiding shared
>libraries.
>
>If you need special features you may have to set some flags.
>
>
>-Original Message-
>From: sqlite-users-boun...@sqlite.org
>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
>Sent: Wednesday, January 30, 2013 9:06 AM
>To: sqlite-users@sqlite.org
>Subject: [sqlite] Sqlite ubuntu 12.10 compile/install
>
>Ok I have used sqlite in windows software no problems.  
>I am now trying to use it in software I am porting to ubuntu 12.10 and I am
>finding that the source code I used under windows has compile issues.  And
>when I downloaded the .gz file and ran ./configure on that fileset I got
>errors
>on that.  
>
>I know I not being specific on the errors I got.  But my question here is...
>basically under ubuntu what should my procedure be for installing and
>compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
>on that OS.  
>
>Thank you,
>
>David Clark
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
For the rest of my project I am using the g++ compiler.  But for discussion 
here I ran your statement and got this:
sqlite3.c: In function ‘sqlite3VXPrintf’:
sqlite3.c:19892:39: error: ‘SrcList_item’ undeclared (first use in this 
function)
sqlite3.c:19892:39: note: each undeclared identifier is reported only once for 
each function it appears in
sqlite3.c:19892:53: error: expected expression before ‘)’ token
sqlite3.c: In function ‘unixOpen’:
sqlite3.c:27868:18: error: ‘UnixUnsedFd’ undeclared (first use in this function)
sqlite3.c:27868:31: error: expected expression before ‘)’ token

I get a similar error from g++...as far I can tell in my source code and header 
file.  These two items are undeclared.  

Any ideas?  

Thank you,

David Clark



>
> From: Michael Black <mdblac...@yahoo.com>
>To: 'David Clark' <quincy...@yahoo.com>; 'General Discussion of SQLite 
>Database' <sqlite-users@sqlite.org> 
>Sent: Wednesday, January 30, 2013 9:30 AM
>Subject: RE: [sqlite] Sqlite ubuntu 12.10 compile/install
> 
>Use the amalgamation:
>
>cc -O -c sqlite3.c
>
>Then link it into your program.  Most of us recommend avoiding shared
>libraries.
>
>If you need special features you may have to set some flags.
>
>
>-Original Message-
>From: sqlite-users-boun...@sqlite.org
>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
>Sent: Wednesday, January 30, 2013 9:06 AM
>To: sqlite-users@sqlite.org
>Subject: [sqlite] Sqlite ubuntu 12.10 compile/install
>
>Ok I have used sqlite in windows software no problems.  
>I am now trying to use it in software I am porting to ubuntu 12.10 and I am
>finding that the source code I used under windows has compile issues.  And
>when I downloaded the .gz file and ran ./configure on that fileset I got
>errors
>on that.  
>
>I know I not being specific on the errors I got.  But my question here is...
>basically under ubuntu what should my procedure be for installing and
>compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
>on that OS.  
>
>Thank you,
>
>David Clark
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
Ok I have used sqlite in windows software no problems.  
I am now trying to use it in software I am porting to ubuntu 12.10 and I am
finding that the source code I used under windows has compile issues.  And
when I downloaded the .gz file and ran ./configure on that fileset I got errors
on that.  

I know I not being specific on the errors I got.  But my question here is...
basically under ubuntu what should my procedure be for installing and
compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
on that OS.  

Thank you,

David Clark
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] multithreaded query testing results, and a significant windows performance improvement (10x).

2008-10-17 Thread David Clark
I would think maybe one performance demo that could be used from the 
command line to demonstrate performance and then secondarily show how it is
achieved.

The TRANSACTIONS did do the trick.  I saw 3,000 inserts per 
second.  Could most likely get more performance from it if I want away from
prepping the query each time like explained elsewhere, etc.

Now on the multi threaded demo, I ran into this result.  I queried 
the first 500 records in my database.  And for a single thread all 
queries completed below
1 ms.  For 500 threads with SQlite serializing the access I would 
expect the longest queries to take no more than maybe 500ms.  But 
alas within 6 queries
I was into queries that took so long I gave up waiting for them.

But if I put my own mutex around the query operation the longest 
queries in a 500 thread demo where no longer than 500ms.  Which makes 
since.  So
that is the way I will do things there.

Ok now for a offering.  I did speed up performance on both inserts 
and queries by a whopping 10x using this function replacement:
/*
** Make sure all writes to a particular file are committed to disk.
*/
static int winSync(sqlite3_file *id, int flags){
   winFile *pFile = (winFile*)id;
   HANDLE dup_handle;
   int retval=SQLITE_IOERR; // assume failure
   HANDLE prochandle=GetCurrentProcess(); // get the process handle

   OSTRACE3("SYNC %d lock=%d\n", pFile->h, pFile->locktype);
#ifdef SQLITE_TEST
   if( flags & SQLITE_SYNC_FULL ){
 sqlite3_fullsync_count++;
   }
   sqlite3_sync_count++;
#endif

   if (DuplicateHandle(prochandle, pFile->h, prochandle, _handle, 0, TRUE,
 DUPLICATE_SAME_ACCESS) == TRUE) {
 if (CloseHandle(dup_handle)!=0)
 return SQLITE_OK; // ok the file buffers have been flushed.
   }
   return(retval);
}

Something that has worked for (11) years for me in application 
logging functionality...let me know if anyone finds issue or knows of 
issue with it.  I have
only tried this on windows NT/2000/XP x64.

David Clark



At 03:31 PM 10/15/2008, Doug wrote:
>I don't mean to pick on the OP, but this is such a commonly asked question
>for people new to SQLite (including me not so long ago) that maybe putting
>something like what you just said many places on the website (besides just
>the Wiki) would help.  Perhaps on the INSERT doc page?  And maybe make it
>bold?
>
>Doug
>
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> [<mailto:sqlite-users->mailto:sqlite-users-
> > [EMAIL PROTECTED] On Behalf Of D. Richard Hipp
> > Sent: Wednesday, October 15, 2008 3:16 PM
> > To: [EMAIL PROTECTED]; General Discussion of SQLite Database
> > Subject: Re: [sqlite] basic insert questions...
> >
> >
> > On Oct 15, 2008, at 4:01 PM, Jay A. Kreibich wrote:
> > >
> > >  Issue the command "BEGIN", do 100 to 1 INSERTs, issue a
> > "COMMIT".
> > >  You should see a very noticeable difference in speed.
> > >>
> >
> > Just to amplify Jay's words: On a workstation, SQLite should do at
> > least 50,000 INSERTs per second.  But due to limitations of spinning
> > disk drives, you can get at most 60 transactions per second.  If you
> > do not use BEGIN...COMMIT, then each INSERT is a separate transaction,
> > regardless of whether or not they are in the same string.  By doing
> > the BEGIN...COMMIT with the INSERT statements in between, you can do
> > thousands and thousands of fast INSERTs for each relatively slow
> > COMMIT.
> >
> >
> > D. Richard Hipp
> > [EMAIL PROTECTED]
> >
> >
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] basic insert questions...

2008-10-15 Thread David Clark
At 03:01 PM 10/15/2008, Jay A. Kreibich wrote:
>On Wed, Oct 15, 2008 at 01:38:16PM -0500, David Clark scratched on the wall:
> > Ok I want to convert a large application which uses ad-hoc data
> > structures and file formats to a sqlite database.  But before I do that
> > I am working on a proof of concept test to show that yea it will work
> > once conversion is done.
> >
> > But alas my first test is failing miserably.  Well, it works it just
> > takes way too long.  Like at least all night.
> > I create table tbl2
> >  f1 varchar(30)
> >  f2 varchar(30)
> >  f3 varchar(30)
> >  identity integer primary index autoincrement
> >
> > That works I have the table.
> > I go to insert into with
> > insert into tbl2 values ("0001", "0001", "0001", NULL);
> >
> > insert into tbl2 values ("0002", "0002", "0002", NULL);
> >
> > Ok I did each insert as separate query using the 5 minute example and
> > it took all night and never did complete.
>
>   You need to wrap them up in a transaction.

ok will look into that.




>   Also, if you want to store integers, store integers.  SQLite allows
>   the same column to store records of different types.

No the real application uses mostly string data.  I am using the 
numbers just to give me something different to put in.


>   Also, string-literals in SQL use single quotes.

Yes that was just a typeo on the post...sorry about that...the app 
uses ' quotes.


> > So then I decided...ok the fsync() for serialization is the problem.
> >
> > So I looked at limits.html and make a single query out of as many as
> > would fit in a 100 byte buffer.  That turned out to be
> > 15625 inserts.  That should be one fsync per query so should be much
> > faster...but alas I don't think it is.
>
>   That won't process them as one statement.  Even if you pass them into
>   SQLite as a big command buffer, they're still processed one at a
>   time.
>
>   Issue the command "BEGIN", do 100 to 1 INSERTs, issue a "COMMIT".
>   You should see a very noticeable difference in speed.
>
> > My second test would be a random query into this large table to see
> > how long that took.  Then random queries from a large
> > number of threads.  Get a query time under 1 second for pulling up a
> > record...and this product is so in my application.
>
>   Depending on your query needs, you might need to look into indexes.
>
>-j
>
>--
>Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
>"Our opponent is an alien starship packed with atomic bombs.  We have
>  a protractor."   "I'll go home and see if I can scrounge up a ruler
>  and a piece of string."  --from Anathem by Neal Stephenson
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] question: remote clients reading and writing to a sqlite database.

2008-10-15 Thread David Clark
Ok I know this is not what sqlite was designed for.   But via a odbc 
driver or any other extension tool is it possible to have remote 
clients read/write/query sqlite tables?

The reason I ask.  We have remote installations that generate data in 
local tables.  Then we have hit those installations with what is 
currently a Microsoft SQL connection and access there 
data.  Unfortunately...for unknown reasons sometimes Microsoft SQL 
goes into a funk and a query locally that should be compiled in 
milliseconds can take like 6 minutes.  The idea here is if we could 
wedge SQLite into the situation it most likely would not happen but 
if it did...because it is open source and has so many tools built 
into the way it is built.   We can figure out and resolve what is going on.

Thanks,
David Clark

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] basic insert questions...

2008-10-15 Thread David Clark
Ok I want to convert a large application which uses ad-hoc data 
structures and file formats to a sqlite database.  But before I do that
I am working on a proof of concept test to show that yea it will work 
once conversion is done.

But alas my first test is failing miserably.  Well, it works it just 
takes way too long.  Like at least all night.
I create table tbl2
 f1 varchar(30)
 f2 varchar(30)
 f3 varchar(30)
 identity integer primary index autoincrement

That works I have the table.
I go to insert into with
insert into tbl2 values ("0001", "0001", "0001", NULL);

insert into tbl2 values ("0002", "0002", "0002", NULL);

Ok I did each insert as separate query using the 5 minute example and 
it took all night and never did complete.

So then I decided...ok the fsync() for serialization is the problem.

So I looked at limits.html and make a single query out of as many as 
would fit in a 100 byte buffer.  That turned out to be
15625 inserts.  That should be one fsync per query so should be much 
faster...but alas I don't think it is.

My second test would be a random query into this large table to see 
how long that took.  Then random queries from a large
number of threads.  Get a query time under 1 second for pulling up a 
record...and this product is so in my application.

Any ideas,
Thanks,
David

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users