Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2011 07:39 PM, Simon Slavin wrote:
> Actually I don't see how BLOBs can be used in an index anyway, since 
> technically blobs have no ordering.

memcmp provides an ordering just as it can for strings without a collation.
 (That is what SQLite implements - you can decide how that complies with "SQL".)

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4yHnIACgkQmOOfHg372QQ2lACgighSjQE9YWG4PyV0ZJh3niCj
oHgAn2pn23N0ZQtJ8f2pZS84lg2PS8fN
=csl7
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Anyone have sqlite shared library for AIX 64 bit?

2011-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2011 03:05 PM, Dale Arntson wrote:
> I installed python 2.7.1 for AIX 6.1 (64 bit), but it appears to be 
> missing the _sqlite3.so library, even though this is a standard library 
> that comes with the current python release on all other platforms.

That is misleading.  _sqlite3.so is the C portion of the pysqlite module
known as sqlite3 when distributed with standard Python.  However this is
only provided as a binary in the Windows distributions.

When you compile Python yourself the main setup.py looks to see if the
SQLite development files are present and if so then it enables compiling the
C portion of the sqlite3 module.  What has happened is that those files were
not present during compilation.

Note that it is not sufficient to have the main SQLite shared library
installed - you at least need to have the sqlite3.h header file and whatever
your platform uses to enable library linking (AIX was always bizarre for this).

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4yHZQACgkQmOOfHg372QSz5wCgkgrFkpYXiXPyQYJJXxFts1AR
XfcAnR+ZTJBOUvqxwf9o/b2SfxEGe2gs
=jQpa
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Simon Slavin

On 29 Jul 2011, at 3:34am, Roger Binns wrote:

> On 07/28/2011 06:57 PM, Simon Slavin wrote:
>> Would it improve the SQLite time if it was changed to strings instead of 
>> BLOBs ?
> 
> Note that internally SQLite treats strings and blobs virtually identically.
> Usually the same data structure and functions are used for them.  At the
> end of the day they are both a bag of bytes.
> 
> The major difference is that strings also have an encoding which needs to be
> taken into account should the bag of bytes need to be passed to a user
> defined function, collation, return code etc.

So that's a "no".  Actually I don't see how BLOBs can be used in an index 
anyway, since technically blobs have no ordering.  But the nature of SQL is 
that if you can't sort on it you can't index it, and that would mean you 
couldn't search for a BLOB.

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


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2011 06:57 PM, Simon Slavin wrote:
> Would it improve the SQLite time if it was changed to strings instead of 
> BLOBs ?

Note that internally SQLite treats strings and blobs virtually identically.
 Usually the same data structure and functions are used for them.  At the
end of the day they are both a bag of bytes.

The major difference is that strings also have an encoding which needs to be
taken into account should the bag of bytes need to be passed to a user
defined function, collation, return code etc.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4yHCYACgkQmOOfHg372QQ7ugCgm+ZBxtQJdpeLc/+ibVX8yVD9
8cEAn0GtwGRnH9hQfc8JuQZ580vP3Ia7
=oPtH
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Afriza N. Arief
On Fri, Jul 29, 2011 at 8:53 AM, Richard Hipp  wrote:

> On Thu, Jul 28, 2011 at 12:27 AM,  wrote:
>
> > they used
> >
> > CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))
> > CREATE INDEX keyindex ON test (key)
> >
>
> Notice the inefficiencies inherent in this schema.
>
> (1) A primary key on a BLOB?  Really?
> (2) They create an redundant index on the primary key.  They would double
> the write performance with no impact on read performance simply be omitting
> the index.
>
> I propose a new set of benchmarks, SQLite vs. LevelDB, with the following
> schema:
>
>   CREATE TABLE test(key INTEGER PRIMARY KEY, value BLOB);
>
> I'm thinking SQLite will do much better in that case, and may well exceed
> the performance of LevelDB in most cases.  (This is a guess - I have not
> actually tried it.)
>
> Of course, if you really do need a blob-to-blob mapping, then I suppose
> LevelDB might be a better choice.  But not many applications do that kind
> of
> thing.  What SQL database (other than SQLite) even allows an index or
> primary key on a blob???


Actually as per their blog-post (
http://google-opensource.blogspot.com/2011/07/leveldb-fast-persistent-key-value-store.html
) .
They probably want to simulate "an ordered mapping from string keys to
string values" and to test "batch updates that modify many keys scattered
across a large key space".
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Alexey Pechnikov
There are the LevelDB sources and tests
svn checkout http://leveldb.googlecode.com/svn/trunk/ leveldb-read-only

Build SQLite test as
make db_bench_sqlite3
And LevelDB test as
make db_bench

My patch for leveldb-read-only/doc/bench/db_bench_sqlite3.cc to disable
redudant index and enable WAL is here:
http://pastebin.com/dM2iqdvj

And patch as above plus integer keys instead of blobs
http://pastebin.com/CnBeChWg

P.S. For blob-to-blob mapping we may use table with index on hashed key.
Virtual table can simplify this.

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Editing sqlite3 commands

2011-07-28 Thread J Decker
On Thu, Jul 28, 2011 at 1:08 PM, Jay A. Kreibich  wrote:
> On Thu, Jul 28, 2011 at 12:57:45PM -0700, km4hr scratched on the wall:
>>
>> Is there a way to edit SQL commands typed in on the command line?
>
>  Only if the "sqlite3" tool is compiled with a copy of the readline
>  library.  In that case, just hit up-arrow.
>

windows command line supports up-arrow too (without readline)

>   -j
>
> --
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Intelligence is like underwear: it is important that you have it,
>  but showing it to the wrong people has the tendency to make them
>  feel uncomfortable." -- Angela Johnson
> ___
> 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] LevelDB benchmark

2011-07-28 Thread Richard Hipp
On Thu, Jul 28, 2011 at 12:27 AM,  wrote:

> they used
>
> CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))
> CREATE INDEX keyindex ON test (key)
>

Notice the inefficiencies inherent in this schema.

(1) A primary key on a BLOB?  Really?
(2) They create an redundant index on the primary key.  They would double
the write performance with no impact on read performance simply be omitting
the index.

I propose a new set of benchmarks, SQLite vs. LevelDB, with the following
schema:

   CREATE TABLE test(key INTEGER PRIMARY KEY, value BLOB);

I'm thinking SQLite will do much better in that case, and may well exceed
the performance of LevelDB in most cases.  (This is a guess - I have not
actually tried it.)

Of course, if you really do need a blob-to-blob mapping, then I suppose
LevelDB might be a better choice.  But not many applications do that kind of
thing.  What SQL database (other than SQLite) even allows an index or
primary key on a blob???

I hereby call on all you loyal readers out there to help me come up with a
more balanced comparison between SQLite and LevelDB.  The published
benchmark from Google strikes me more as a hit piece than a reasonable
comparison between the databases.

I'm on a business trip and am unable to help a great deal until early next
week.  So your cooperation will be greatly appreciated.  May I suggest the
following comparisons as a start:

(1) Rerun the Google benchmarks with (a) WAL enabled and (b) the redundant
index removed.

(2) Modify the Google benchmarks to test an INTEGER->BLOB mapping using an
INTEGER PRIMARY KEY on SQLite, instead of the BLOB->BLOB mapping.

I suspect that I will come up with other suggestions once I have a chance to
dig a little deeper into the benchmarks.  If you have suggestions, please
publish them here.

Thanks for your help and support!



>
>
> on random replaces it doubles the write operations.
>
>
>
> J Decker schrieb:
> > On Wed, Jul 27, 2011 at 6:22 PM, Stephan Wehner 
> wrote:
> >> There are some benchmark's at
> >> http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html
> >>
> >> I don't have anything to point to, but I thought sqlite3 does better
> >> than stated there.
> >>
> >> In particular, 26,900 sequential writes per second and 420 random writes
> >> per second from section "1. Baseline Performance" look suspicious.
> >>
> >
> > Wow, that's a bad mark for sqlite; I dunno it's somewhat misleading,
> > because I do know that if I use sqlite as a logging database, and
> > stream data to it it's kinda slow, and works better if I bunch up
> > inserts with multiple value sets.  But, enabling transactions, and
> > doing the same thing, write speed goes way up.  And now with WAL
> > journal, it might affect that speed test also in auto transact mode
> > especially
> >
> >> What you say?
> >>
> >> Stephan
> >> ___
> >> 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
>



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


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Alexey Pechnikov
Hm, I test I find index on PK field:

CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))
CREATE INDEX keyindex ON test (key)

Epic fail, I think :D


Default test on Intel(R) Atom(TM) CPU N450   @ 1.66GHz
fillseq  : 442.937 micros/op;0.2 MB/s
fillseqsync  :1678.168 micros/op;0.1 MB/s (1 ops)
fillseqbatch :  73.016 micros/op;1.5 MB/s
...

And with enabled WAL and synchronous=NORMAL and wal_autocheckpoint=4096
(LevelDB log size is 4Mb by default) and without index on PK field (!):
fillseq  : 139.190 micros/op;0.8 MB/s
fillseqsync  : 228.869 micros/op;0.5 MB/s (1 ops)
fillseqbatch :  56.131 micros/op;2.0 MB/s
...

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] LevelDB benchmark

2011-07-28 Thread Alexey Pechnikov
LevelDB use append log but SQLite is tested without WAL :)
I check and some tests 2.5x faster with WAL.


-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Anyone have sqlite shared library for AIX 64 bit?

2011-07-28 Thread Dale Arntson
I installed python 2.7.1 for AIX 6.1 (64 bit), but it appears to be 
missing the _sqlite3.so library, even though this is a standard library 
that comes with the current python release on all other platforms. Does 
anyone know of the existence of a sqlite3 shared library for AIX 6.1 (64 
bit) or earlier that I could get my hands on?

Thanks,

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


Re: [sqlite] Getting a handle to open blobs

2011-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2011 09:21 AM, Clifford Hung wrote:
> For statements, sqlite3_next_stmt() can be called to return a pointer to the 
> first prepared statement associated with a database connection 

In my opinion that API is a huge mistake outside the context of debugging tools.

C is a language where you have to manually keep track of the various items
you allocate and use.  There is no garbage collection and there is no
builtin way to enable reference counting.  There are no standard library
collections.  There is no tracking of memory ownership.

Consequently each piece of code/library/abstraction needs to look after
itself.  This API lets you reach in to something owned by some other piece
of code and unless that code was sloppily written you will pretty much only
end up harming it.

When you are writing short code, performing this housekeeping is a bit of a
pain, but remember that you don't actually have to close the statements and
database.  Providing you have committed you can exit the process and your
transactions will be durable.

If your code lives within a process that has a longer lifetime then you will
have to perform housekeeping because that is the C way.  There are numerous
wrappers binding the SQLite library to other programming languages and to my
knowledge almost all of them will perform the housekeeping for you that is
appropriate to the language.

If you will be using C then I recommend using one of the hierarchical memory
allocators.  What they let you do is provide a context for each memory
allocation including a destructor, and you can then free all of the relevant
allocations with one call.  As an example if you were handling requests you
could make each request be a context and all allocations relevant to that
request use that context.  At then end of handling that request, no matter
how many allocations happened or if there were errors, you can free
everything in one go.  (Note this all only works for allocations made using
the hierarchical memory allocator APIs.)

Here are two to get you started.  They are both open source and are licensed
in such a way that you can use them in a proprietary program:

  http://ccan.ozlabs.org/info/talloc.html
  http://swapped.cc/halloc/

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4xw74ACgkQmOOfHg372QQMfACfWfESN57aOkQN6HhfFoWNOhMs
i5gAnR9ACcxnuK7IoN7b9/jtcHgaRB4Z
=KXYW
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Editing SQL commands in sqlite3

2011-07-28 Thread Pavel Ivanov
If you configure and compile sqlite3 command line yourself and your
system have readline installed then yes.

Pavel


On Thu, Jul 28, 2011 at 4:08 PM,   wrote:
> Is it possible to edit commands entered on the sqlite3 command line?
>
>
>
>
>
> ___
> 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] Editing sqlite3 commands

2011-07-28 Thread Jay A. Kreibich
On Thu, Jul 28, 2011 at 12:57:45PM -0700, km4hr scratched on the wall:
> 
> Is there a way to edit SQL commands typed in on the command line? 

  Only if the "sqlite3" tool is compiled with a copy of the readline
  library.  In that case, just hit up-arrow.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Editing SQL commands in sqlite3

2011-07-28 Thread km4hr
Is it possible to edit commands entered on the sqlite3 command line?
 

 


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


[sqlite] Editing sqlite3 commands

2011-07-28 Thread km4hr

Is there a way to edit SQL commands typed in on the command line? 
-- 
View this message in context: 
http://old.nabble.com/Editing-sqlite3-commands-tp32158636p32158636.html
Sent from the SQLite mailing list archive at Nabble.com.

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


[sqlite] Loading Data

2011-07-28 Thread Daniel Spain




hey all. i got my engine to compile so now im doing basic SQL syntax of load 
the user, since its in a very early production stage the players table only has 
4 values to load. Table: Players  UserID varchar(30) /* their constant 
userid */  Race smallint  /*  their race number */  
Class smallint /* their class number */  Loaded smallint  
/* character was loaded? */when a user hits 'P' to play from the mainmenu 
the programexecutes loaduser() this queries the database ande loadstheir user 
data, and if it does not exist it will insert an initialrecord.i've tries this 
a bunch of different ways that result in falsequeries or inserting multiple 
records with the sameusername. ill post what im doing and someone can point me 
in the right direction./* snippet from SQLMUD.C */ 
player=_data[usrnum]; if( (margc == 1)  && (toupper(margv[0][0]) == 'P' 
)) /* menu command to play the game */{ loaduser(); if(player->loaded)  
   { pmlt("I loaded your character record.\r"); } else {
 pmlt("I did not load your character record, creating a new one.\r"); 
}}/* snippet from MUDUSER.C */  VOIDloaduser(VOID)/* load character data 
*/{ sqlite3 *database; sqlite3_stmt *statement; const CHAR *tail;   
  INT rc;  usaptr=(usrnum);  /* lets open the database */
 rc=sqlite3_open("SQLMUD.DB",); /* error: unable to establish 
connection */if(rc!=SQLITE_OK){   pmlt("I was unable to establish a 
connection to the database! Exiting.\r");   return;} /* create a 
query string */sprintf(vdatmp,"select * from Players where UserID = 
'%s'",usaptr->userid); 
rc=sqlite3_prepare_v2(database,vdatmp,INPSIZ,,); 
if(rc!=SQLITE_OK){//did not query i think here is where i insert a 
new character record?pmlt("Could not query you in the database, i think 
i need to insert.\r");sqlie3_close(database);return;}  
player->loaded=0;  while(sqlite3_step(statement)==SQLITE_ROW) { 
 pmlt("LOAD: USERID = %s\r",sqlite3_column_text(statement,0));   
pmlt("LOAD: RACE = %s\r",sqlite3_column_text(statement,1));   
pmlt("LOAD: CLASS = %s\r",sqlite3_column_text(statement,2));   
pmlt("LOAD: LOADED = %s\r",sqlite3_column_text(statement,3));   
strncpy(player->userid,sqlite3_column_text(statement,0),UIDSIZ);   
player->race=atoi(sqlite3_column_text(statement,1));   
player->class=atoi(sqlite3_column_text(statement,2));  
player->loaded=atoi(sqlite3_column_text(statement,3));  } 
sqlite3_finalize(statement);sqlite3_close(database);}so what im trying to 
accomplish is: when they hit the menu command 'P' it loads their data.within 
loaduser() i want it to query the database for them by name.if it dont exist 
create an initial record containing default dataelse load their data.the user 
flag 'loaded' tells the game to either create a newcharacter or enter with the 
loaded data.  i got several other samples i been playing with but ill start 
with this oneto get pointed in the right direction. 
  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_OMIT_UTF16

2011-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2011 12:40 AM, Baruch Burstein wrote:
> On the same topic, I know the documentation says SQLITE_OMIT_* are not
> supported by the amalgamation, but I have used many of them to successfully
> reduce my object file. Is there any documentation on what *does* work with
> the amalgamation?

Nope.  Trying to go down that route is silly and a waste of time which is
why it is diplomatically called "not supported".

Some omits just leave out some functions, but others alter data structures
and others also change the grammar, and some do combinations of those.  And
what happens could change between releases.  Also the test suite has never
been run against code where someone has tried to shortcut the omissions.

It is trivial to regenerate an amalgamation from the source and that is
exactly what you should do.  The generated amalgamation can be used on any
platform and only needs to be generated once (ie it doesn't have to be part
of the build process on every machine and you could just check the results
into your source code control).

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4xq/IACgkQmOOfHg372QQ5+wCg4xhvcD99x6kHQCfme+C7/g9u
1fQAnAjsEnSusI6VH8YCL4V0canIPL32
=U44n
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Cannot load DLLs using NUnit with SQLite

2011-07-28 Thread Brad Laney
Hello,

My situation is that I am setting up our testing project for unit tests using 
NUnit.
The requirements are developers must be able to run the tests from within 
visual studio and through the nunit exe, and also our continuous integration 
server must be able to run the unit tests after a check in.

I found 4 versions of the binaries available for .net 4.0
These would be: mixed mode x86, non mixed mode x86, mixed mode x64, non mixed 
mode x64

No matter which one I use, I always get the same error:

Could not find any resources appropriate for the specified culture or the 
neutral culture.  Make sure "System.Data.SQLite.SR.resources" was correctly 
embedded or linked into assembly "System.Data.SQLite" at compile time, or that 
all the satellite assemblies required are loadable and fully signed.

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


Re: [sqlite] Cannot find tclsqlite3.dll in latest binary distribution for Windows

2011-07-28 Thread Everton Vieira
The tclsqlite3.dll i do not know. But this days i've used the ActiveTcl
http://www.activestate.com/activetcl the instalation of him installs the
tcl85.dll I think it maybe can help you.
2011/7/27 Jerzy Witkowski 

> Hello,
>
> I tried to upgrade my environment to latest Sqlite distribution
> 3.7.7.1.  Usually I downloaded two files from Download page
> http://www.sqlite.org/download.html section "Precompiled Binaries For
> Windows": sqlite3.exe and tclsqlite3.dll.  This time I was unable to
> find tclsqlite3.dll file.  Please help.
>
> Best regards, Jerzy Witkowski
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Getting a handle to open blobs

2011-07-28 Thread Richard Hipp
On Thu, Jul 28, 2011 at 9:21 AM, Clifford Hung  wrote:

> I would like to make a feature request for a function to return a handle to
> the first open blob handle. For statements, sqlite3_next_stmt() can be
> called to return a pointer to the first prepared statement associated with a
> database connection but there doesn't appear to be such a function for
> returning a blob handle associated with a database connection. This would be
> useful for preparing to close a database connection that may have open blob
> handles.
>

The SQLite developers have be talking internally about implementing
sqlite3_close_v2() which has an extra flags argument to alter the behavior.
For example, with sqlite3_close_v2(), you can ask it to close blob handles
automatically.  Or you can ask for handles to be reference counted so you
can sqlite3_blob_close() after the sqlite3_close_v2() rather than before, if
you prefer (or if your garbage collector just choses to do it that way.)


>
> Thanks,
> Cliff
>
>
> -
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute non-public
> information. Any use of this information by anyone other than the intended
> recipient is prohibited. If you have received this transmission in error,
> please immediately reply to the sender and delete this information from your
> system. Use, dissemination, distribution, or reproduction of this
> transmission by unintended recipients is not authorized and may be unlawful.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


[sqlite] Getting a handle to open blobs

2011-07-28 Thread Clifford Hung
I would like to make a feature request for a function to return a handle to the 
first open blob handle. For statements, sqlite3_next_stmt() can be called to 
return a pointer to the first prepared statement associated with a database 
connection but there doesn't appear to be such a function for returning a blob 
handle associated with a database connection. This would be useful for 
preparing to close a database connection that may have open blob handles.

Thanks,
Cliff


-
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SELECT query first run is VERY slow

2011-07-28 Thread Max Vlasov
On Thu, Jul 28, 2011 at 11:41 AM, Григорий Григоренко wrote:

> So, should we file this as a defect or bug somehow?
>
>
As I understand currently the issues acknowledged and fixed during the
e-mail conversation in this list ( read
http://www.sqlite.org/src/wiki?name=Bug+Reports ). So I'd rather ask Richard
or Dan writing their resolution here about either behavior is by design or
the issue is acknowledged and (maybe) will be fixed.

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


[sqlite] Cannot find tclsqlite3.dll in latest binary distribution for Windows

2011-07-28 Thread Jerzy Witkowski
Hello,

I tried to upgrade my environment to latest Sqlite distribution
3.7.7.1.  Usually I downloaded two files from Download page
http://www.sqlite.org/download.html section "Precompiled Binaries For
Windows": sqlite3.exe and tclsqlite3.dll.  This time I was unable to
find tclsqlite3.dll file.  Please help.

Best regards, Jerzy Witkowski
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SELECT query first run is VERY slow

2011-07-28 Thread Григорий Григоренко
So, should we file this as a defect or bug somehow?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_OMIT_UTF16

2011-07-28 Thread Baruch Burstein
Thank you. I went back through my command history and saw I had accidentally
searched sqlite3.h instead of sqlite3.c Sorry to bother everyone.

On the same topic, I know the documentation says SQLITE_OMIT_* are not
supported by the amalgamation, but I have used many of them to successfully
reduce my object file. Is there any documentation on what *does* work with
the amalgamation? I found a couple that didn't work, but I think it was a
simple issue to correct (they were removing the functions themselves but not
the function decelerations)

On Wed, Jul 27, 2011 at 8:31 PM, Roger Binns  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 07/27/2011 04:16 AM, Baruch Burstein wrote:
> > The thing I don't understand is how can this be, because when I search
> > sqlite3.c for "SQLITE_OMIT_UTF16", I am told it doesn't exist in this
> file!
>
> You need a better search tool.  Against the 3.7.7.1 amalgamation I get 46
> matches.
>
> $ grep -nw SQLITE_OMIT_UTF16 sqlite3.c
> 12376:#ifdef SQLITE_OMIT_UTF16
> 20158:#ifndef SQLITE_OMIT_UTF16
> 20337:#endif /* SQLITE_OMIT_UTF16 */
> 20392:#ifndef SQLITE_OMIT_UTF16
> 20520:#endif /* SQLITE_OMIT_UTF16 */
> 56433:#ifdef SQLITE_OMIT_UTF16
> 57140:#ifndef SQLITE_OMIT_UTF16
> 60959:#ifndef SQLITE_OMIT_UTF16
> 60969:#endif /* SQLITE_OMIT_UTF16 */
> 61012:#ifndef SQLITE_OMIT_UTF16
> 61040:#ifndef SQLITE_OMIT_UTF16
> 61068:#endif /* SQLITE_OMIT_UTF16 */
> 61605:#ifndef SQLITE_OMIT_UTF16
> 61611:#endif /* SQLITE_OMIT_UTF16 */
> 61679:#ifndef SQLITE_OMIT_UTF16
> 61704:#ifndef SQLITE_OMIT_UTF16
> 61709:#endif /* SQLITE_OMIT_UTF16 */
> 61722:#ifndef SQLITE_OMIT_UTF16
> 61727:#endif /* SQLITE_OMIT_UTF16 */
> 61738:#ifndef SQLITE_OMIT_UTF16
> 61743:#endif /* SQLITE_OMIT_UTF16 */
> 61754:#ifndef SQLITE_OMIT_UTF16
> 61759:#endif /* SQLITE_OMIT_UTF16 */
> 61906:#ifndef SQLITE_OMIT_UTF16
> 61916:#endif /* SQLITE_OMIT_UTF16 */
> 62221:#ifndef SQLITE_OMIT_UTF16
> 63670:#ifndef SQLITE_OMIT_UTF16
> 81123:#ifndef SQLITE_OMIT_UTF16
> 87470:#ifdef SQLITE_OMIT_UTF16
> 89302:#ifndef SQLITE_OMIT_UTF16
> 89373:#endif /* SQLITE_OMIT_UTF16 */
> 90385:#ifndef SQLITE_OMIT_UTF16
> 90464:#endif /* SQLITE_OMIT_UTF16 */
> 100666:#ifndef SQLITE_OMIT_UTF16
> 107801:#ifndef SQLITE_OMIT_UTF16
> 107827:#endif /* SQLITE_OMIT_UTF16 */
> 108962:#ifndef SQLITE_OMIT_UTF16
> 109082:#ifndef SQLITE_OMIT_UTF16
> 109461:#ifndef SQLITE_OMIT_UTF16
> 109506:#endif /* SQLITE_OMIT_UTF16 */
> 110222:#ifndef SQLITE_OMIT_UTF16
> 110258:#endif /* SQLITE_OMIT_UTF16 */
> 110299:#ifndef SQLITE_OMIT_UTF16
> 110323:#endif /* SQLITE_OMIT_UTF16 */
> 110342:#ifndef SQLITE_OMIT_UTF16
> 110359:#endif /* SQLITE_OMIT_UTF16 */
>
> Roger
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iEYEARECAAYFAk4wS2AACgkQmOOfHg372QRm6wCfVVYJVn8VcmOCHWaquKP9oaNI
> 6yQAoILQx+T1b0mooqY41oxvBSY+9S7W
> =k9rY
> -END PGP SIGNATURE-
> ___
> 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] LevelDB benchmark

2011-07-28 Thread reseok
they used

CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))
CREATE INDEX keyindex ON test (key)


on random replaces it doubles the write operations.



J Decker schrieb:
> On Wed, Jul 27, 2011 at 6:22 PM, Stephan Wehner  
> wrote:
>> There are some benchmark's at
>> http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html
>>
>> I don't have anything to point to, but I thought sqlite3 does better
>> than stated there.
>>
>> In particular, 26,900 sequential writes per second and 420 random writes
>> per second from section "1. Baseline Performance" look suspicious.
>>
> 
> Wow, that's a bad mark for sqlite; I dunno it's somewhat misleading,
> because I do know that if I use sqlite as a logging database, and
> stream data to it it's kinda slow, and works better if I bunch up
> inserts with multiple value sets.  But, enabling transactions, and
> doing the same thing, write speed goes way up.  And now with WAL
> journal, it might affect that speed test also in auto transact mode
> especially
> 
>> What you say?
>>
>> Stephan
>> ___
>> 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