Re: [sqlite] Open source projects using sqlite

2012-01-16 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 16/01/12 21:46, Matt Young wrote:
> Group projects, collected together because sqlite is the common 
> foundation.  Would be nice?

You'll need to use longer sentences.  What exactly do you want to achieve
and who do you want to do the work of grouping projects?

There is a list of well known users at this page although parts are dated:

  http://www.sqlite.org/famous.html

You can find numerous open source projects using SQLite by searching at
Github, Bitbucket, Google Code and SourceForge.

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

iEYEARECAAYFAk8VKh0ACgkQmOOfHg372QS9egCdElHp77YiBI+2BjxtvjmtqLem
Z9UAoMkmbxTgve0za1tUFJwv74E2w4kq
=t+i9
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_bind. error as library routine called out of sequence.

2012-01-16 Thread bhaskarReddy

Hi Mr Black,

   I am very thankful to you. My code is working fine. 

Regards,
Bhaskar Reddy.


Black, Michael (IS) wrote:
> 
> You have to do all the binds together, THEN step.  This works for me.
> 
> 
> 
> #include 
> #include 
> #include 
> #include "sqlite3.h"
> 
> int main()
> {
>   sqlite3 *db;
>   sqlite3_stmt *stmt;
>   int status;
>   char *create = "create table
> ONTTable(slotId,ponChannelId,onuType,onuId,adminStatus);";
> char *query = "insert into ONTTable
> (slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";
> 
>  
> status=sqlite3_open_v2("test.db",,SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE,NULL);
>   if (status != SQLITE_OK)  {
> printf("open error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   sqlite3_exec(db,create,NULL,NULL,NULL);
>   status=sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
>   if (status != SQLITE_OK) {
> printf("prepare error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
> 
>   status=sqlite3_bind_int(stmt,1,1);
>   if (status != SQLITE_OK) {
> printf("bind1 error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   status=sqlite3_bind_int(stmt,2,2);
>   if (status != SQLITE_OK) {
> printf("bind2 error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   status=sqlite3_bind_int(stmt,3,3);
>   if (status != SQLITE_OK) {
> printf("bind3 error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   status=sqlite3_bind_int(stmt,4,4);
>   if (status != SQLITE_OK) {
> printf("bind4 error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   status=sqlite3_bind_int(stmt,5,5);
>   if (status != SQLITE_OK) {
> printf("bind5 error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
> 
>   status=sqlite3_step(stmt);
>   if (status != SQLITE_DONE) {
> printf("step error:%s\n",sqlite3_errmsg(db));
> exit(1);
>   }
>   return 0;
> }
> 
> 
> 
> Michael D. Black
> 
> Senior Scientist
> 
> Advanced Analytics Directorate
> 
> Advanced GEOINT Solutions Operating Unit
> 
> Northrop Grumman Information Systems
> 
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
> behalf of bhaskarReddy [uni...@gmail.com]
> Sent: Monday, January 16, 2012 7:46 AM
> To: sqlite-users@sqlite.org
> Subject: EXT :[sqlite] sqlite3_bind. error as library routine called out
> of sequence.
> 
> 
> Hi Friends,
> 
>   When i tried,
>  query = "insert into ONTTable
> (slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";
> then binding each parameter.
> 
> //sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> slotId);
> sqlite3_step(stmt,DONE);
> 
> //sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
> sqlite3_step(stmt,DONE);
> 
> //sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> ontType);
> sqlite3_step(stmt,DONE);
> 
> //sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> onuId);
> sqlite3_step(stmt,DONE);
> 
> //sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> adminStatus);
> 
> I am getting the following error.
> sqilte3_bind_int(stmt,1,ontTable -> ponChannelId) failed with status 21:
> library routine called out of sequence.
> 
> 
> 
> Regards,
> Bhaskar Reddy.
> 
> --
> View this message in context:
> http://old.nabble.com/sqlite3_bind.-error-as-library-routine-called-out-of-sequence.-tp33147572p33147572.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-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/sqlite3_bind.-error-as-library-routine-called-out-of-sequence.-tp33147572p33152332.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] Open source projects using sqlite

2012-01-16 Thread Matt Young
Group projects, collected together because sqlite is the common
 foundation.  Would be nice?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Tue, Jan 17, 2012 at 5:05 AM, John Elrick wrote:

> >
> I can try that approach with BCC.   I was concerned that the IDE would be
> getting inaccurate information from the .OBJ.  Crossing into a pre-complied
> library can be tricky.
>
>
As I recall,I could not make debug information compiled by bcc visible in
Delphi IDE, but everything will be ok if you make your code compatible with
fpc/lazarus. Besides the fact that you will be able to walk inside sqlite c
code and inspect the data (gdb is used), you will probably make your
software cross-platform. Besides, there is a library for lazarus/fpc
(developed by Ludo Brands and me) for inspecting stack calling paths with
whose memory blocks are allocated (similar to Valgrind tool). By the way,
Ludo did a great job with stack unwinding since I remember false positives
like ones mentioned here when calling chains were very strange and he had
to implement a sophisticated stack analysis for many real world examples

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Mon, Jan 16, 2012 at 5:31 PM, Richard Hipp  wrote:

> On Mon, Jan 16, 2012 at 5:13 PM, John Elrick  >wrote:
>
> > I did this trace through the Delphi IDE and hand copied the call stack.
> >  Unfortunately, I can't give you line numbers, although I could go back
> and
> > give you hex offsets from the start of the procedures.  These are
> literally
> > the first seven call stacks from _malloc after I initiate the trace.  I'm
> > noticing a pattern.  Hopefully 1) the information from the IDE is
> accurate
> > and 2) this helps.  The trace reads from bottom to top.
> >
>
> I do not think the information below is correct.  For example, at no point
> does sqlite3_db_status() ever call malloc().  Similarly, sqlite3_free()
> never calls sqlite3_db_status().  And really - why would sqlite3_free()
> ever call malloc() - that makes no sense.
>
> I'm thinking the Delphi IDE is not giving you good information here, which
> is too bad since we could have really used the information if it had been
> good.
>
> Are there any options to Delphi that can give you better diagnostics?  Do
> you need to recompile SQLite without optimization and including the -g
> option?
>
>
I can try that approach with BCC.   I was concerned that the IDE would be
getting inaccurate information from the .OBJ.  Crossing into a pre-complied
library can be tricky.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
I will adjust the realloc tests tomorrow and let you know.  The two
routines are unique in the Delphi library unit.

Thanks again for your time and efforts.

On Mon, Jan 16, 2012 at 5:36 PM, Richard Hipp  wrote:

> On Mon, Jan 16, 2012 at 5:31 PM, John Elrick  >wrote:
>
> >
> > I don't know if the calls to _realloc will help also, but I've added
> > tracing for those also.  My updated output:
> > Cumulative _mallocs by size
> > <= 1kb:   1,118,058,528 bytes (63,640,300
> > count)
> > 1kb to 4kb:   3,836,490,296 bytes (6,197,060
> count)
> > 4bk to 8kb:   47,800,672 bytes (11,571 count)
> > 8bk to 16kb:  597,016 bytes (46 count)
> > 16bk to 32kb: 224,272,704 bytes (10,136 count)
> > 32bk to 64kb: 64,008 bytes (1 count)Cumulative
> > _reallocs by size
> > <= 1kb:   1,117,392,608 bytes (63,637,756
> > count)
> > 1kb to 4kb:   3,836,372,120 bytes (6,196,954
> count)
> > 4bk to 8kb:   30,800 bytes (6 count)
> > 8bk to 16kb:  0 bytes (0 count)
> >
>
> This is very curious and perhaps a useful clue.  SQLite does call
> realloc(), but not that often.  And yet here we see realloc() being called
> almost as much as malloc().  I'll investigate further on this end.  In the
> meantime, are you *certain* that the numbers above are correct?  Please
> register as a malloc() any call to realloc(A,B) where A is NULL.  With that
> change, are the numbers above still the same?
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_db_release_memory(): Return value undocumented.

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 11:05pm, Ralf Junker wrote:

> Reading the sources, sqlite3_db_release_memory() always returns
> SQLITE_OK. Will it stay this way or will it some day return another
> value like the amount of memory released?

It will stay like that.  Almost all the sqlite3 routines return a result code.  
If you want to know how much memory was released consult sqlite3_memory_used() 
before and after.

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


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-16 Thread Jean-Christophe Deschamps

At 01:08 17/01/2012, you wrote:
´¯¯¯
Richard, Simon, and you are seeing eye-to-eye on this. Earlier in the 
thread (since trimmed, of course), it was stated that SQLite was 
designed to be tiny so that each app could include the entire system 
without draining resources significantly (this would solve the problem 
of apps stepping on each other with different versions of 
). So if that's the case, why not kill the distribution 
of  and force the developers to do it the right way? 
Regards, Joe

`---

That would preclude use of SQLite in situation where no linking is 
possible, like many scripting languages, etc.  That it is allright for 
your current use cases doesn't imply it's convenient or even possible 
for others. 


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


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-16 Thread Joe Winograd

> The search path stuff is a mess under Microsoft.

Yes, it sure is. The link you sent has some interesting stuff. In 
particular, this point is key:


Before the system searches for a DLL, it checks the following:

(1) If a DLL with the same module name is already loaded in memory, the 
system uses the loaded DLL, no matter which directory it is in. The system 
does not search for the DLL.


(2) If the DLL is on the list of known DLLs for the version of Windows on 
which the application is running, the system uses its copy of the known DLL 
(and the known DLL's dependent DLLs, if any). The system does not search for 
the DLL. For a list of known DLLs on the current system, see the following 
registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session 
Manager\KnownDLLs.


Re (1), I ran a report to view loaded DLLs and no version of SQLite is 
there. Re (2), I checked the registry entry shown and no version of SQLite 
is in the KnownDLLs key.


With (1) and (2) out of the way, the search order is clear: regardless of 
the SafeDllSearchMode setting, it will always search the directory from 
which the application loaded first. Hence, copying the latest  
into the Connection Manager app directory should have worked, but it did not 
(see below).


> you may be able to copy the latest sqlite3.dll into the one application 
directory and replace the old one.


That's what I did to the one in the HP Connection Manager directory. Didn't 
fix the problem. There is no  anywhere in the TurboTax 
directory structure, so nothing to replace. Yet everyone reporting the 
problem on the HP forum says the problem started when they installed TT (CM 
is typically pre-installed on HP machines and works fine until TT is installed).


> To the best of my knowledge it's upwards compatible.

Yes, Richard stated that much earlier in the thread ("SQLite is always 
backwards compatible."), but it has long since been trimmed out, as frequent 
and heavy trimming seems to be the MO in this group. Speaking of that, I 
also documented ALL of the  files earlier in the thread. In 
addition to CM, they are:


c:\Program Files (x86)\Calibre2\DLLs\sqlite3.dll
c:\Program Files (x86)\Common Files\Apple\Apple Application Support\SQLite3.dll
c:\Program Files (x86)\Nuance\PaperPort\sqlite3.dll

Calibre and PaperPort are working fine (so is TT). The only piece of Apple 
software on the machine is QuickTime, and it is working fine. None of them 
copied the SQLite DLL into a system folder and none of them placed it in the 
list of known DLLs.


> Anybody who uses an SQLite DLL should be hung up by their boots.

Richard, Simon, and you are seeing eye-to-eye on this. Earlier in the thread 
(since trimmed, of course), it was stated that SQLite was designed to be 
tiny so that each app could include the entire system without draining 
resources significantly (this would solve the problem of apps stepping on 
each other with different versions of ). So if that's the case, 
why not kill the distribution of  and force the developers to 
do it the right way? Regards, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Black, Michael (IS) 
To: General Discussion of SQLite Database 
Date: Monday, January 16, 2012 14:40:23

You don't need to "register" the SQLite DLL.  That's for ActiveX and COM DLLs.  
Not ones that just export functions.



The search path stuff is a mess under Microsoft.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#standard_search_order_for_desktop_applications

You may be able to get away with getting rid of ALL sqlite3.dll's and just 
putting the latest version in %SystemRoot%\system32 -- or you may be able to 
copy the latest sqlite3.dll into the one application directory and replace the 
old one.  To the best of my knowledge it's upwards compatible.



Anybody who uses an SQLite DLL should be hung up by their 
boots.



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems
___




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


[sqlite] sqlite3_db_release_memory(): Return value undocumented.

2012-01-16 Thread Ralf Junker
Reading the sources, sqlite3_db_release_memory() always returns
SQLITE_OK. Will it stay this way or will it some day return another
value like the amount of memory released?

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 5:31 PM, John Elrick wrote:

>
> I don't know if the calls to _realloc will help also, but I've added
> tracing for those also.  My updated output:
> Cumulative _mallocs by size
> <= 1kb:   1,118,058,528 bytes (63,640,300
> count)
> 1kb to 4kb:   3,836,490,296 bytes (6,197,060 count)
> 4bk to 8kb:   47,800,672 bytes (11,571 count)
> 8bk to 16kb:  597,016 bytes (46 count)
> 16bk to 32kb: 224,272,704 bytes (10,136 count)
> 32bk to 64kb: 64,008 bytes (1 count)Cumulative
> _reallocs by size
> <= 1kb:   1,117,392,608 bytes (63,637,756
> count)
> 1kb to 4kb:   3,836,372,120 bytes (6,196,954 count)
> 4bk to 8kb:   30,800 bytes (6 count)
> 8bk to 16kb:  0 bytes (0 count)
>

This is very curious and perhaps a useful clue.  SQLite does call
realloc(), but not that often.  And yet here we see realloc() being called
almost as much as malloc().  I'll investigate further on this end.  In the
meantime, are you *certain* that the numbers above are correct?  Please
register as a malloc() any call to realloc(A,B) where A is NULL.  With that
change, are the numbers above still the same?



-- 
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] Some pieces of the puzzle are coming together

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 5:13 PM, John Elrick wrote:

> I did this trace through the Delphi IDE and hand copied the call stack.
>  Unfortunately, I can't give you line numbers, although I could go back and
> give you hex offsets from the start of the procedures.  These are literally
> the first seven call stacks from _malloc after I initiate the trace.  I'm
> noticing a pattern.  Hopefully 1) the information from the IDE is accurate
> and 2) this helps.  The trace reads from bottom to top.
>

I do not think the information below is correct.  For example, at no point
does sqlite3_db_status() ever call malloc().  Similarly, sqlite3_free()
never calls sqlite3_db_status().  And really - why would sqlite3_free()
ever call malloc() - that makes no sense.

I'm thinking the Delphi IDE is not giving you good information here, which
is too bad since we could have really used the information if it had been
good.

Are there any options to Delphi that can give you better diagnostics?  Do
you need to recompile SQLite without optimization and including the -g
option?


>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_backup_pagecount
> _sqlite3_backup_pagecount
> _sqlite3_column_decltype
> _sqlite3_bind_text
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_free
> _sqlite3_stmt_status
> _sqlite3_stmt_status
> _sqlite3_free_table
> _sqlite3_free_table
> _sqlite3_free_table
> _sqlite3_exec
> _sqlite3_exec
> _sqlite3_prepare_v2
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_stmt_status
> _sqlite3_stmt_status
> _sqlite3_free_table
> _sqlite3_free_table
> _sqlite3_free_table
> _sqlite3_exec
> _sqlite3_exec
> _sqlite3_prepare_v2
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free_table
> _sqlite3_free_table
> _sqlite3_exec
> _sqlite3_exec
> _sqlite3_prepare_v2
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_free
> _sqlite3_exec
> _sqlite3_exec
> _sqlite3_prepare_v2
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_backup_pagecount
> _sqlite3_stmt_status
> _sqlite3_stmt_status
> _squite3_reset
> _sqlite3_step
>
> _malloc
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_db_status
> _sqlite3_free
> _sqlite3_free
> _sqlite3_free
> _sqlite3_stmt_status
> _sqlite3_stmt_status
> _squite3_reset
> _sqlite3_step
> ___
> 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] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
Richard,

I don't know if the calls to _realloc will help also, but I've added
tracing for those also.  My updated output:

Application:  Surveyor.exe
Sqlite version:   3.7.9
Date/Time:01/16/2012 17:20:58
Memory Used:  7,905,536 (max 8,582,104) bytes
Page Cache Used:  0 (max 0) pages
Page Cache Overflow:  6,910,576 (max 6,911,600) bytes
Number of Scratch Allocations Used:   0 (max 0)
Scratch Overflow: 0 (max 24,880) bytes
Largest Allocation:   500,042 bytes
Parser Stack: 0
Largest Pcache Allocation:4,232 bytes
Largest Scratch Allocation:   24,880 bytes
Number of Outstanding Allocations:5,835 (max 6,499)
Lookaside Slots Used: 500 (max 500)
Pager Heap Usage: 6,873,408 bytes
Schema Heap Usage:39,560 bytes
Statement Heap/Lookaside Usage:   806,592 bytes
Successful lookaside attempts:4,888
Lookaside failures due to size:   3,782,307
Lookaside failures due to OOM:4,090,019
Page cache hits:  2,585,425
Page cache misses:0
Cumulative Allocated Memory:  932,315,928
Count of _malloc Calls:   69,859,114
Cumulative Reallocated Memory:931,150,680
Count of _realloc Calls:  69,856,395
Count of _free Calls: 69,857,292
Cumulative _mallocs by size
<= 1kb:   1,118,058,528 bytes (63,640,300 count)
1kb to 4kb:   3,836,490,296 bytes (6,197,060 count)
4bk to 8kb:   47,800,672 bytes (11,571 count)
8bk to 16kb:  597,016 bytes (46 count)
16bk to 32kb: 224,272,704 bytes (10,136 count)
32bk to 64kb: 64,008 bytes (1 count)
64bk to 128kb:0 bytes (0 count)
128kb to 256kb:   0 bytes (0 count)
256kb to 512kb:   0 bytes (0 count)
512kb to 1024kb:  0 bytes (0 count)
> 1mb:0 bytes (0 count)
Cumulative _reallocs by size
<= 1kb:   1,117,392,608 bytes (63,637,756 count)
1kb to 4kb:   3,836,372,120 bytes (6,196,954 count)
4bk to 8kb:   30,800 bytes (6 count)
8bk to 16kb:  0 bytes (0 count)
16bk to 32kb: 0 bytes (0 count)
32bk to 64kb: 0 bytes (0 count)
64bk to 128kb:0 bytes (0 count)
128kb to 256kb:   0 bytes (0 count)
256kb to 512kb:   0 bytes (0 count)
512kb to 1024kb:  0 bytes (0 count)
> 1mb:0 bytes (0 count)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Mon, Jan 16, 2012 at 5:14 PM, Simon Slavin  wrote:

>
> On 16 Jan 2012, at 9:37pm, John Elrick wrote:
>
> > Lacking the status interfaces for 3.6.17 I was forced to mark them as
> > "interface not supported".  Simon suggested I track the calls to _malloc,
> > so I've added extensive tracing code.
>
> Those results are excellently detailed and make no sense to me at all.
>  Fortunately there are people on this list who know the internals of SQLite
> far better than I do.  Well done for getting that diagnostic to the point
> you have.


Thanks very much.  You have no idea how much I appreciate that pat on the
back (or maybe you do...)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 9:37pm, John Elrick wrote:

> Lacking the status interfaces for 3.6.17 I was forced to mark them as
> "interface not supported".  Simon suggested I track the calls to _malloc,
> so I've added extensive tracing code.

Those results are excellently detailed and make no sense to me at all.  
Fortunately there are people on this list who know the internals of SQLite far 
better than I do.  Well done for getting that diagnostic to the point you have.

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
I did this trace through the Delphi IDE and hand copied the call stack.
 Unfortunately, I can't give you line numbers, although I could go back and
give you hex offsets from the start of the procedures.  These are literally
the first seven call stacks from _malloc after I initiate the trace.  I'm
noticing a pattern.  Hopefully 1) the information from the IDE is accurate
and 2) this helps.  The trace reads from bottom to top.

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_backup_pagecount
_sqlite3_backup_pagecount
_sqlite3_column_decltype
_sqlite3_bind_text

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_free
_sqlite3_stmt_status
_sqlite3_stmt_status
_sqlite3_free_table
_sqlite3_free_table
_sqlite3_free_table
_sqlite3_exec
_sqlite3_exec
_sqlite3_prepare_v2

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_stmt_status
_sqlite3_stmt_status
_sqlite3_free_table
_sqlite3_free_table
_sqlite3_free_table
_sqlite3_exec
_sqlite3_exec
_sqlite3_prepare_v2

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free_table
_sqlite3_free_table
_sqlite3_exec
_sqlite3_exec
_sqlite3_prepare_v2

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_free
_sqlite3_exec
_sqlite3_exec
_sqlite3_prepare_v2

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_backup_pagecount
_sqlite3_stmt_status
_sqlite3_stmt_status
_squite3_reset
_sqlite3_step

_malloc
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_db_status
_sqlite3_free
_sqlite3_free
_sqlite3_free
_sqlite3_stmt_status
_sqlite3_stmt_status
_squite3_reset
_sqlite3_step
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 4:37 PM, John Elrick wrote:

> Sqlite version:   3.6.17
> Cumulative _mallocs by size
> <= 1kb:   109,025,904 bytes (565,230 count)
> 1kb to 4kb:   510,357,112 bytes (485,801 count)
> 4bk to 8kb:   48,005,376 bytes (11,610 count)
>
> Sqlite version:   3.7.9
> Cumulative _mallocs by size
> <= 1kb:   1,118,058,528 bytes (63,640,300
> count)
> 1kb to 4kb:   3,836,490,296 bytes (6,197,060 count)
>

Clearly there are many more small mallocs happening with 3.7.9 than with
3.6.17.  We just need to figure out why.

Here's a suggestion:  Run the program in a debugger and look at the stack
trace every time a small malloc occurs..  Since the extra mallocs far
outnumber the regular mallocs, chances are you'll find the place which is
doing all of the extra mallocing pretty quickly.  Please let us know where
all these extra mallocs are coming from.

If you can give me 6 or 12 different places from within SQLite where the
extra mallocs are coming from, that will probably be a sufficient clue.

-- 
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] sqlite3_uri_int64() doc error

2012-01-16 Thread Ralf Junker
The sqlite3_uri_int64() doc reads: "If the value of P is something other
than an integer, then zero is returned." I found this to be not true.
Instead, it returned default.

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
Addendum: This test was conducted using a full size test dataset.  I had
been using one that was an order of magnitude smaller for profiling before,
but could use the full size for this test.

On Mon, Jan 16, 2012 at 4:37 PM, John Elrick wrote:

> Lacking the status interfaces for 3.6.17 I was forced to mark them as
> "interface not supported".  Simon suggested I track the calls to _malloc,
> so I've added extensive tracing code.  Here is the final output from the
> two versions:
>
> Application:  Surveyor.exe
> Sqlite version:   3.6.17
> Date/Time:01/16/2012 16:32:18
> Memory Used:  interface not supported
> Page Cache Used:  interface not supported
> Page Cache Overflow:  interface not supported
> Number of Scratch Allocations Used:   interface not supported
> Scratch Overflow: interface not supported
> Largest Allocation:   interface not supported
> Parser Stack: interface not supported
> Largest Pcache Allocation:interface not supported
> Largest Scratch Allocation:   interface not supported
> Number of Outstanding Allocations:interface not supported
> Lookaside Slots Used: interface not supported
> Pager Heap Usage: interface not supported
> Schema Heap Usage:interface not supported
> Statement Heap/Lookaside Usage:   interface not supported
> Successful lookaside attempts:interface not supported
> Lookaside failures due to size:   interface not supported
> Lookaside failures due to OOM:interface not supported
> Page cache hits:  interface not supported
> Page cache misses:interface not supported
> Cumulative Allocated Memory:  892,318,312
> Count of _malloc Calls:   1,072,825
> Count of _free Calls: 1,070,971
> Cumulative _mallocs by size
> <= 1kb:   109,025,904 bytes (565,230 count)
> 1kb to 4kb:   510,357,112 bytes (485,801 count)
> 4bk to 8kb:   48,005,376 bytes (11,610 count)
> 8bk to 16kb:  605,208 bytes (47 count)
> 16bk to 32kb: 224,272,704 bytes (10,136 count)
> 32bk to 64kb: 52,008 bytes (1 count)
> 64bk to 128kb:0 bytes (0 count)
> 128kb to 256kb:   0 bytes (0 count)
> 256kb to 512kb:   0 bytes (0 count)
> 512kb to 1024kb:  0 bytes (0 count)
> > 1mb:0 bytes (0 count)
>
> Application:  Surveyor.exe
> Sqlite version:   3.7.9
> Date/Time:01/16/2012 16:35:01
> Memory Used:  7,905,536 (max 8,582,104) bytes
> Page Cache Used:  0 (max 0) pages
> Page Cache Overflow:  6,910,576 (max 6,911,600) bytes
> Number of Scratch Allocations Used:   0 (max 0)
> Scratch Overflow: 0 (max 24,880) bytes
> Largest Allocation:   500,042 bytes
> Parser Stack: 0
> Largest Pcache Allocation:4,232 bytes
> Largest Scratch Allocation:   24,880 bytes
> Number of Outstanding Allocations:5,835 (max 6,499)
> Lookaside Slots Used: 500 (max 500)
> Pager Heap Usage: 6,873,408 bytes
> Schema Heap Usage:39,560 bytes
> Statement Heap/Lookaside Usage:   806,592 bytes
> Successful lookaside attempts:4,888
> Lookaside failures due to size:   3,782,307
> Lookaside failures due to OOM:4,090,019
> Page cache hits:  2,585,425
> Page cache misses:0
> Cumulative Allocated Memory:  932,315,928
> Count of _malloc Calls:   69,859,114
> Count of _free Calls: 69,857,292
> Cumulative _mallocs by size
> <= 1kb:   1,118,058,528 bytes (63,640,300
> count)
> 1kb to 4kb:   3,836,490,296 bytes (6,197,060 count)
> 4bk to 8kb:   47,800,672 bytes (11,571 count)
> 8bk to 16kb:  597,016 bytes (46 count)
> 16bk to 32kb: 224,272,704 bytes (10,136 count)
> 32bk to 64kb: 64,008 bytes (1 count)
> 64bk to 128kb:0 bytes (0 count)
> 128kb to 256kb:   0 bytes (0 count)
> 256kb to 512kb:   0 bytes (0 count)
> 512kb to 1024kb:  0 bytes (0 count)
> > 1mb:0 bytes (0 count)
>



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing 

Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
Lacking the status interfaces for 3.6.17 I was forced to mark them as
"interface not supported".  Simon suggested I track the calls to _malloc,
so I've added extensive tracing code.  Here is the final output from the
two versions:

Application:  Surveyor.exe
Sqlite version:   3.6.17
Date/Time:01/16/2012 16:32:18
Memory Used:  interface not supported
Page Cache Used:  interface not supported
Page Cache Overflow:  interface not supported
Number of Scratch Allocations Used:   interface not supported
Scratch Overflow: interface not supported
Largest Allocation:   interface not supported
Parser Stack: interface not supported
Largest Pcache Allocation:interface not supported
Largest Scratch Allocation:   interface not supported
Number of Outstanding Allocations:interface not supported
Lookaside Slots Used: interface not supported
Pager Heap Usage: interface not supported
Schema Heap Usage:interface not supported
Statement Heap/Lookaside Usage:   interface not supported
Successful lookaside attempts:interface not supported
Lookaside failures due to size:   interface not supported
Lookaside failures due to OOM:interface not supported
Page cache hits:  interface not supported
Page cache misses:interface not supported
Cumulative Allocated Memory:  892,318,312
Count of _malloc Calls:   1,072,825
Count of _free Calls: 1,070,971
Cumulative _mallocs by size
<= 1kb:   109,025,904 bytes (565,230 count)
1kb to 4kb:   510,357,112 bytes (485,801 count)
4bk to 8kb:   48,005,376 bytes (11,610 count)
8bk to 16kb:  605,208 bytes (47 count)
16bk to 32kb: 224,272,704 bytes (10,136 count)
32bk to 64kb: 52,008 bytes (1 count)
64bk to 128kb:0 bytes (0 count)
128kb to 256kb:   0 bytes (0 count)
256kb to 512kb:   0 bytes (0 count)
512kb to 1024kb:  0 bytes (0 count)
> 1mb:0 bytes (0 count)

Application:  Surveyor.exe
Sqlite version:   3.7.9
Date/Time:01/16/2012 16:35:01
Memory Used:  7,905,536 (max 8,582,104) bytes
Page Cache Used:  0 (max 0) pages
Page Cache Overflow:  6,910,576 (max 6,911,600) bytes
Number of Scratch Allocations Used:   0 (max 0)
Scratch Overflow: 0 (max 24,880) bytes
Largest Allocation:   500,042 bytes
Parser Stack: 0
Largest Pcache Allocation:4,232 bytes
Largest Scratch Allocation:   24,880 bytes
Number of Outstanding Allocations:5,835 (max 6,499)
Lookaside Slots Used: 500 (max 500)
Pager Heap Usage: 6,873,408 bytes
Schema Heap Usage:39,560 bytes
Statement Heap/Lookaside Usage:   806,592 bytes
Successful lookaside attempts:4,888
Lookaside failures due to size:   3,782,307
Lookaside failures due to OOM:4,090,019
Page cache hits:  2,585,425
Page cache misses:0
Cumulative Allocated Memory:  932,315,928
Count of _malloc Calls:   69,859,114
Count of _free Calls: 69,857,292
Cumulative _mallocs by size
<= 1kb:   1,118,058,528 bytes (63,640,300 count)
1kb to 4kb:   3,836,490,296 bytes (6,197,060 count)
4bk to 8kb:   47,800,672 bytes (11,571 count)
8bk to 16kb:  597,016 bytes (46 count)
16bk to 32kb: 224,272,704 bytes (10,136 count)
32bk to 64kb: 64,008 bytes (1 count)
64bk to 128kb:0 bytes (0 count)
128kb to 256kb:   0 bytes (0 count)
256kb to 512kb:   0 bytes (0 count)
512kb to 1024kb:  0 bytes (0 count)
> 1mb:0 bytes (0 count)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-16 Thread Black, Michael (IS)
You don't need to "register" the SQLite DLL.  That's for ActiveX and COM DLLs.  
Not ones that just export functions.



The search path stuff is a mess under Microsoft.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#standard_search_order_for_desktop_applications

You may be able to get away with getting rid of ALL sqlite3.dll's and just 
putting the latest version in %SystemRoot%\system32 -- or you may be able to 
copy the latest sqlite3.dll into the one application directory and replace the 
old one.  To the best of my knowledge it's upwards compatible.



Anybody who uses an SQLite DLL should be hung up by their 
boots.



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 8:11pm, Bill McCormick wrote:

> I was sort of hoping it might be narrowed down to one of the documents on 
> this page:
> 
> http://www.sqlite.org/docs.html
> 
> Typing "script" and "command line" in the search box didn't help me find what 
> I was looking for either.

Ah, I totally understand that problem.  It's called 'shell tool'.  Googling 
'sqlite shell' should do it.

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
On Mon, Jan 16, 2012 at 9:21 PM, Tim Streater  wrote:

> I'm using the PDO interface from PHP for SQLite3 with no problems. What
> are you referring to?
>

Sorry for the confusion - i meant that those are languages which _do_ have
sqlite3 bindings (but my wording implied the opposite).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sql/tcl script

2012-01-16 Thread Tim Streater
On 16 Jan 2012 at 18:15, Stephan Beal  wrote: 

> On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick wrote:
>
>> Is tcl the only scripting interface for SQLite? I'm just wondering what
>> the options are.

> There are few scripting languages which don't have an sqlite3 binding. Just
> to name a few:
>
> - Perl
> - PHP

I'm using the PDO interface from PHP for SQLite3 with no problems. What are you 
referring to?

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Bill McCormick

Simon Slavin wrote, On 1/16/2012 1:45 PM:

On 16 Jan 2012, at 7:34pm, Bill McCormick wrote:


Looks like pipes work as well (cat yoursql.sql|sqlite3  yourdb.db3).

Also, can I safely delete the database file (yourdb.db3, using your example) if 
I just want to start again? It appears that I can.

Not while an app has it open, but if none of the apps are running then yes: a 
database file is just a single file, with no funny tricks about it, and you can 
move, rename or delete it.


Where are these little nuggets documented?

www.sqlite.org

I was sort of hoping it might be narrowed down to one of the documents 
on this page:


http://www.sqlite.org/docs.html

Typing "script" and "command line" in the search box didn't help me find 
what I was looking for either. Worse, it lead me down the Tcl path, 
thinking that Tcl would be the only way to do this. I didn't find 
anything in the FAQ's that answered my question either.


I guess it's just a matter of coming up to speed.

Thanks!!


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


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-16 Thread Joe Winograd
Ah, I see that embedded images don't make it in this group, so the screen 
shot referred to in my previous message is attached. Regards, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Joe Winograd 
To: General Discussion of SQLite Database 
Date: Monday, January 16, 2012 13:40:58

Thanks for the response, Michael.

This is a 64-bit W7 machine. The two supposedly conflicting programs are:
c:\Program Files (x86)\TurboTax\Home & Business 2010\32bit\TurboTax.exe
c:\Program Files (x86)\Hewlett-Packard\HP Connection 
Manager\HPConnectionManager.exe


TurboTax does not have a copy of  anywhere in its directory 
structure. Connection Manager does. I had reported earlier that CM didn't, 
but that was my mistake, probably because I uninstalled it before doing 
the search for . I just reinstalled CM and got the same 
 dialog as previously reported – and subsequently trimmed. :)


I downloaded the latest  from the link that Richard provided 
and replaced the copy in . Running CM fails in the same way as previously 
reported and running  (which is in the same directory as the 
CM executable and the new ) also fails in the same way as 
previously reported.


I did not copy the new  into , as there is no version to 
replace. Does it still make sense to copy it into this directory, where 
 resides?


A couple of other possibly worthy tidbits: (1) I ran a DLL report before 
and after attempting the CM install. It did not show any  
registered. (2) I attempted to register manually (via RegSvr32) the new 
. It gives this error dialog:


SQLite3-DLL-regsvr32-error

CM still failed in the same way. Further ideas? Thanks, Joe

 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Black, Michael (IS) 
To: General Discussion of SQLite Database 
Date: Sunday, January 15, 2012 13:56:33
My point still standsyou can test the application compatibility by 
copying the DLL into the app directory and changing the search order as I 
recommended.  Did you try that?




The applications really need to compile sqlite in their app.  That's the 
good fix here as has been pointed out (and something I always do).  But 
good luck with that one.






Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] 
on behalf of Joe Winograd [j...@winograd.us]

Sent: Sunday, January 15, 2012 1:52 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Incompatible versions of SQLite on same system


I don't really mind top or bottom post.

I don't either, but it really should be one or the other; otherwise, you're
jumping up and down to follow a thread. But that's because of the next
point, where we disagree completely.

>  But the important thing is to trim anything you've quoted to just the
useful bits. We don't need to see every single post to the thread every time
someone adds a new post.

I strongly disagree with this. In personal (one-on-one) correspondence, it
makes sense, but not in email-based groups/forums, where members come and go
at various points in time. A member should be able to jump into a thread and
easily review the whole issue in one email. Having to go back and look at
every trimmed message to piece together the entire thread is painful and,
frankly, won't usually be done. This is also why top posting is better. The
combination of the two (NOT trimming and top posting) means that a new
entrant to the discussion can review the entire thread in one email
(admittedly, having to page-up) while someone who has been participating in
the discussion for a while can simply look at the top-posted most recent
response(s).

I think we actually have an example of the trimming problem in this thread.
I may be wrong, and Michael Black may jump in to say I'm wrong, but a key
comment of mine had been trimmed, viz., the  doesn't even
appear in the application directory of the two conflicting apps. If Michael
had seen that in a non-trimmed message, I'm guessing he would not have said,
"Can't you just copy the DLL into the application directory?" Come to think
of it, by the time it got to Michael, "TurboTax" and "HP Connection Manager"
(the two conflicting programs) had been trimmed out of the message. I would
argue that those are "useful bits" of this thread.

I think there are times when trimming is appropriate, but in most cases, I
think that threads should be left intact. Just my humble, of course. 
Cheers, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite 

Re: [sqlite] sql/tcl script

2012-01-16 Thread Oliver Peters

Am 16.01.2012 20:34, schrieb Bill McCormick:

Oliver Peters wrote, On 1/16/2012 1:02 PM:

Am 16.01.2012 19:59, schrieb Bill McCormick:

James Pearson wrote, On 1/16/2012 12:28 PM:

If it's just for setting up databases, tables, etc, why not just use a
sql script?

Throw all your database object creation sql into a file and then
execute that file from within sqlite using the ".read FILE" command.


I think this is what I'm looking for. Is there some way to have sqlite3
execute a .read FILE command from a bash prompt?




sqlite3 yourdb.db3 < yoursql.sql


Even better.

Looks like pipes work as well (cat yoursql.sql|sqlite3 yourdb.db3).



http://www.linuxwiki.de/UselessUseOfCat



Also, can I safely delete the database file (yourdb.db3, using your
example) if I just want to start again? It appears that I can.


what do you mean by "safely delete"?



Where are these little nuggets documented?


sqlite3 --help

and

sqlite3
.h

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 7:34pm, Bill McCormick wrote:

> Looks like pipes work as well (cat yoursql.sql|sqlite3  yourdb.db3).
> 
> Also, can I safely delete the database file (yourdb.db3, using your example) 
> if I just want to start again? It appears that I can.

Not while an app has it open, but if none of the apps are running then yes: a 
database file is just a single file, with no funny tricks about it, and you can 
move, rename or delete it.

> Where are these little nuggets documented?

www.sqlite.org

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 2:28 PM, Udi Karni  wrote:

>
> (2) I am new to share-ware. I don't compile my own code. How long between
> "checked in" and "included in the shell-for-windows on the download page" ?
>
>
Since SQLite 3.7.10 was released earlier this morning, you hit the worst
case, and the time to seeing a precompiled binary on the download page will
be about 2 or 3 months.

-- 
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] Incompatible versions of SQLite on same system

2012-01-16 Thread Joe Winograd

Thanks for the response, Michael.

This is a 64-bit W7 machine. The two supposedly conflicting programs are:
c:\Program Files (x86)\TurboTax\Home & Business 2010\32bit\TurboTax.exe
c:\Program Files (x86)\Hewlett-Packard\HP Connection 
Manager\HPConnectionManager.exe


TurboTax does not have a copy of  anywhere in its directory 
structure. Connection Manager does. I had reported earlier that CM didn't, 
but that was my mistake, probably because I uninstalled it before doing the 
search for . I just reinstalled CM and got the same 
 dialog as previously reported – and subsequently trimmed. :)


I downloaded the latest  from the link that Richard provided 
and replaced the copy in . Running CM fails in the same way as previously reported 
and running  (which is in the same directory as the CM 
executable and the new ) also fails in the same way as 
previously reported.


I did not copy the new  into , as there is no version to 
replace. Does it still make sense to copy it into this directory, where 
 resides?


A couple of other possibly worthy tidbits: (1) I ran a DLL report before and 
after attempting the CM install. It did not show any  
registered. (2) I attempted to register manually (via RegSvr32) the new 
. It gives this error dialog:


SQLite3-DLL-regsvr32-error

CM still failed in the same way. Further ideas? Thanks, Joe

 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Black, Michael (IS) 
To: General Discussion of SQLite Database 
Date: Sunday, January 15, 2012 13:56:33

My point still standsyou can test the application compatibility by copying 
the DLL into the app directory and changing the search order as I recommended.  
Did you try that?



The applications really need to compile sqlite in their app.  That's the good 
fix here as has been pointed out (and something I always do).  But good luck 
with that one.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Joe Winograd [j...@winograd.us]
Sent: Sunday, January 15, 2012 1:52 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Incompatible versions of SQLite on same system


I don't really mind top or bottom post.

I don't either, but it really should be one or the other; otherwise, you're
jumping up and down to follow a thread. But that's because of the next
point, where we disagree completely.

  >  But the important thing is to trim anything you've quoted to just the
useful bits. We don't need to see every single post to the thread every time
someone adds a new post.

I strongly disagree with this. In personal (one-on-one) correspondence, it
makes sense, but not in email-based groups/forums, where members come and go
at various points in time. A member should be able to jump into a thread and
easily review the whole issue in one email. Having to go back and look at
every trimmed message to piece together the entire thread is painful and,
frankly, won't usually be done. This is also why top posting is better. The
combination of the two (NOT trimming and top posting) means that a new
entrant to the discussion can review the entire thread in one email
(admittedly, having to page-up) while someone who has been participating in
the discussion for a while can simply look at the top-posted most recent
response(s).

I think we actually have an example of the trimming problem in this thread.
I may be wrong, and Michael Black may jump in to say I'm wrong, but a key
comment of mine had been trimmed, viz., the  doesn't even
appear in the application directory of the two conflicting apps. If Michael
had seen that in a non-trimmed message, I'm guessing he would not have said,
"Can't you just copy the DLL into the application directory?" Come to think
of it, by the time it got to Michael, "TurboTax" and "HP Connection Manager"
(the two conflicting programs) had been trimmed out of the message. I would
argue that those are "useful bits" of this thread.

I think there are times when trimming is appropriate, but in most cases, I
think that threads should be left intact. Just my humble, of course. Cheers, Joe

 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Simon Slavin
To: General Discussion of SQLite Database
Date: Thursday, January 12, 2012 19:54:56

On 13 Jan 2012, at 1:46am, Joe Winograd wrote:


Thanks for the clarification.

My pleasure.  Triggers do generally work in the most useful way.  Try coding it 
and see if it works for you.


Btw, is bottom-posting the standard 

Re: [sqlite] sql/tcl script

2012-01-16 Thread Bill McCormick

Oliver Peters wrote, On 1/16/2012 1:02 PM:

Am 16.01.2012 19:59, schrieb Bill McCormick:

James Pearson wrote, On 1/16/2012 12:28 PM:

If it's just for setting up databases, tables, etc, why not just use a
sql script?

Throw all your database object creation sql into a file and then
execute that file from within sqlite using the ".read FILE" command.


I think this is what I'm looking for. Is there some way to have sqlite3
execute a .read FILE command from a bash prompt?




sqlite3  yourdb.db3 < yoursql.sql


Even better.

Looks like pipes work as well (cat yoursql.sql|sqlite3  yourdb.db3).

Also, can I safely delete the database file (yourdb.db3, using your 
example) if I just want to start again? It appears that I can.


Where are these little nuggets documented?

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Thanks Dr. Hipp !

(1) Wow - what fast turnaround in the share-ware world  !!!

(2) I am new to share-ware. I don't compile my own code. How long between
"checked in" and "included in the shell-for-windows on the download page" ?

On Mon, Jan 16, 2012 at 8:57 AM, Richard Hipp  wrote:

> Changes to the command-line shell so that it understands quoted fields have
> now been checked in.
>
> On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:
>
> > Oliver - thanks !
> >
> > Hm so there is no way to specify (borrowing syntax from other
> DBs)
> > something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?
> >
> > On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters 
> wrote:
> >
> > > Am 16.01.2012 17:10, schrieb Udi Karni:
> > >
> > >  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the
> > last
> > >> version I downloaded and unfortunately replaced with the latest...)
> > >>
> > >
> > >
> > > afaik this never worked with the original CLI (might be that you have
> > used
> > > a fork that can do this)
> > >
> > > I see 3 solutions:
> > >
> > > if you can influence the delimiter take a reliable delimiter (a string
> > > you're not using in your file - maybe a |)  and export without " as
> > markers
> > > for text columns
> > >
> > > if cant't influence the look of the source find and don't mind to do it
> > > manually you can import into a spreadsheet program and use a reliable
> > > delimiter without using "
> > >
> > > if you like scripting you can create a little program with your
> favorite
> > > language
> > >
> > > greetings
> > > Oliver
> > >
> > >
> > >
> > >> How, then, do you import character columns that contain commas (like
> > >> addresses) from a .csv which uses commas as a delimiter?
> > >>
> > >> Thanks !
> > >>
> > >> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
> > >>  wrote:
> > >>
> > >>
> > >>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
> > >>>
> > >>>  "COL1","COL2"
> >  "",""
> >  "XX,X",""
> > 
> > >>>
> > >>> Sorry, but the shell tool doesn't understand quotes in csv files.
> > >>>
> > >>> Simon.
> > >>>
> > >> __**_
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> > 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
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
On Mon, Jan 16, 2012 at 8:02 PM, Bill McCormick wrote:

> I assume that you are *NOT* naming the few that don't, rather these
> scripting languages *DO* have sqlite3 binding support.


Yes, sorry - a bad choice of wording on my part. :/

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sql/tcl script

2012-01-16 Thread Oliver Peters

Am 16.01.2012 19:59, schrieb Bill McCormick:

James Pearson wrote, On 1/16/2012 12:28 PM:

If it's just for setting up databases, tables, etc, why not just use a
sql script?

Throw all your database object creation sql into a file and then
execute that file from within sqlite using the ".read FILE" command.


I think this is what I'm looking for. Is there some way to have sqlite3
execute a .read FILE command from a bash prompt?




sqlite3  yourdb.db3 < yoursql.sql

Oliver




___
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] sql/tcl script

2012-01-16 Thread Bill McCormick

Stephan Beal wrote, On 1/16/2012 12:15 PM:

On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormickwrote:


Is tcl the only scripting interface for SQLite? I'm just wondering what
the options are.



There are few scripting languages which don't have an sqlite3 binding. Just
to name a few:

- Perl
- PHP
- JavaScript (v8 and SpiderMonkey engines)
- Python
...


I assume that you are *NOT* naming the few that don't, rather these 
scripting languages *DO* have sqlite3 binding support.

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 6:59pm, Bill McCormick wrote:

> James Pearson wrote, On 1/16/2012 12:28 PM:
>> If it's just for setting up databases, tables, etc, why not just use a sql 
>> script?
>> 
>> Throw all your database object creation sql into a file and then execute 
>> that file from within sqlite using the ".read FILE" command.
>> 
> I think this is what I'm looking for.  Is there some way to have sqlite3 
> execute a .read FILE command from a bash prompt?

Sure.  Use bash scripting.  Or script any other unix shell to run the 'sqlite3' 
command-line tool.  Command options documented here:



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


Re: [sqlite] sql/tcl script

2012-01-16 Thread Bill McCormick

James Pearson wrote, On 1/16/2012 12:28 PM:
If it's just for setting up databases, tables, etc, why not just use a 
sql script?


Throw all your database object creation sql into a file and then 
execute that file from within sqlite using the ".read FILE" command.


I think this is what I'm looking for.  Is there some way to have sqlite3 
execute a .read FILE command from a bash prompt?



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


Re: [sqlite] [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 4:34pm, James Pearson wrote:

> I just updated my sqlite install from 3.7.5 with the 3.7.10 precompiled 
> binaries for Mac OS X and find that the up arrow command recall isn't working.

Works fine for me, downloading the shell from the 'Downloads' page and running 
it under 10.7.2.  Works correctly when run first time, and when run the second 
time hitting the 'up' cursor key recalls lines typed the first time.

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


Re: [sqlite] sql/tcl script

2012-01-16 Thread James Pearson
If it's just for setting up databases, tables, etc, why not just use a 
sql script?


Throw all your database object creation sql into a file and then execute 
that file from within sqlite using the ".read FILE" command.




On 16 Jan 2012, at 11:23, John Elrick wrote:


Ruby also.

On Mon, Jan 16, 2012 at 1:15 PM, Stephan Beal  
wrote:


On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick 


Re: [sqlite] sql/tcl script

2012-01-16 Thread John Elrick
Ruby also.

On Mon, Jan 16, 2012 at 1:15 PM, Stephan Beal  wrote:

> On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick  >wrote:
>
> > Is tcl the only scripting interface for SQLite? I'm just wondering what
> > the options are.
> >
>
>
> There are few scripting languages which don't have an sqlite3 binding. Just
> to name a few:
>
> - Perl
> - PHP
> - JavaScript (v8 and SpiderMonkey engines)
> - Python
> ...
>
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
John Elrick
Fenestra Technologies
540-868-1377
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick wrote:

> Is tcl the only scripting interface for SQLite? I'm just wondering what
> the options are.
>


There are few scripting languages which don't have an sqlite3 binding. Just
to name a few:

- Perl
- PHP
- JavaScript (v8 and SpiderMonkey engines)
- Python
...


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sql/tcl script

2012-01-16 Thread Bill McCormick
Is tcl the only scripting interface for SQLite? I'm just wondering what 
the options are.


I'm trying to write a script to setup my database on new systems (create 
the db, add tables, etc.), but I don't have much experience using Tcl.


My fist attempt is not going so well and I'm not finding help in any of 
the docs online. If you of you experts could kindly provide 1) where I 
should be looking for answers for this sort of thing and 2) and example 
Tcl script, I would be eternally grateful.




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


Re: [sqlite] [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread James Pearson

On 16 Jan 2012, at 10:53, Richard Hipp wrote:

We have now uploaded a new prebuilt command-line shell binary for Mac 
that
has the command-line editing built in.  Please download the new one 
and try

again.

On Mon, Jan 16, 2012 at 12:47 PM, James Pearson  
wrote:



On 16 Jan 2012, at 10:12, Richard Hipp wrote:

On Mon, Jan 16, 2012 at 11:34 AM, James Pearson 

wrote:

I just updated my sqlite install from 3.7.5 with the 3.7.10 
precompiled
binaries for Mac OS X and find that the up arrow command recall 
isn't

working.

Searching for fixes online I can only find suggestions for 
correcting the
issue by compiling sqlite myself. Is that the only way to get 
command

recall working again?



I don't know how to get command-line editing working on a mac even
compiling it myself.  Can you send me links to instructions on how 
to add
command-line editing to Mac programs?  If so, I'll try to add this 
to the

precompiled binaries.


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




My apologies but I'm afraid I don't know how to implement command 
line
editing on macs ... I develop for iOS.  Hopefully someone else here 
on the

listserve can chime in.

Did something change regarding command line stuff from version 3.7.5? 
 I
still have that version of sqlite on my mac and command line recall 
works

fine in that version?

__**_
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




Command line editing working like a charm on the Mac again! ... Thank 
you very much for the quick update!



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


Re: [sqlite] [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread Black, Michael (IS)
Read here on Mac OS X

http://sqlite.org/cvstrac/wiki?p=ReadLine





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of James Pearson [tado...@gmail.com]
Sent: Monday, January 16, 2012 11:47 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] [sqlite-announce] SQLite version 3.7.10

On 16 Jan 2012, at 10:12, Richard Hipp wrote:

> On Mon, Jan 16, 2012 at 11:34 AM, James Pearson 
> wrote:
>
>> I just updated my sqlite install from 3.7.5 with the 3.7.10
>> precompiled
>> binaries for Mac OS X and find that the up arrow command recall isn't
>> working.
>>
>> Searching for fixes online I can only find suggestions for correcting
>> the
>> issue by compiling sqlite myself. Is that the only way to get command
>> recall working again?
>>
>
> I don't know how to get command-line editing working on a mac even
> compiling it myself.  Can you send me links to instructions on how to
> add
> command-line editing to Mac programs?  If so, I'll try to add this to
> the
> precompiled binaries.
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


My apologies but I'm afraid I don't know how to implement command line
editing on macs ... I develop for iOS.  Hopefully someone else here on
the listserve can chime in.

Did something change regarding command line stuff from version 3.7.5?  I
still have that version of sqlite on my mac and command line recall
works fine in that version?
___
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-announce] SQLite version 3.7.10

2012-01-16 Thread Richard Hipp
We have now uploaded a new prebuilt command-line shell binary for Mac that
has the command-line editing built in.  Please download the new one and try
again.

On Mon, Jan 16, 2012 at 12:47 PM, James Pearson  wrote:

> On 16 Jan 2012, at 10:12, Richard Hipp wrote:
>
>  On Mon, Jan 16, 2012 at 11:34 AM, James Pearson 
>> wrote:
>>
>>  I just updated my sqlite install from 3.7.5 with the 3.7.10 precompiled
>>> binaries for Mac OS X and find that the up arrow command recall isn't
>>> working.
>>>
>>> Searching for fixes online I can only find suggestions for correcting the
>>> issue by compiling sqlite myself. Is that the only way to get command
>>> recall working again?
>>>
>>>
>> I don't know how to get command-line editing working on a mac even
>> compiling it myself.  Can you send me links to instructions on how to add
>> command-line editing to Mac programs?  If so, I'll try to add this to the
>> precompiled binaries.
>>
>>
>> --
>> D. Richard Hipp
>> d...@sqlite.org
>> __**_
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>>
>
>
> My apologies but I'm afraid I don't know how to implement command line
> editing on macs ... I develop for iOS.  Hopefully someone else here on the
> listserve can chime in.
>
> Did something change regarding command line stuff from version 3.7.5?  I
> still have that version of sqlite on my mac and command line recall works
> fine in that version?
>
> __**_
> 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] [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread James Pearson

On 16 Jan 2012, at 10:12, Richard Hipp wrote:

On Mon, Jan 16, 2012 at 11:34 AM, James Pearson  
wrote:


I just updated my sqlite install from 3.7.5 with the 3.7.10 
precompiled

binaries for Mac OS X and find that the up arrow command recall isn't
working.

Searching for fixes online I can only find suggestions for correcting 
the

issue by compiling sqlite myself. Is that the only way to get command
recall working again?



I don't know how to get command-line editing working on a mac even
compiling it myself.  Can you send me links to instructions on how to 
add
command-line editing to Mac programs?  If so, I'll try to add this to 
the

precompiled binaries.


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



My apologies but I'm afraid I don't know how to implement command line 
editing on macs ... I develop for iOS.  Hopefully someone else here on 
the listserve can chime in.


Did something change regarding command line stuff from version 3.7.5?  I 
still have that version of sqlite on my mac and command line recall 
works fine in that version?

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Fri, Jan 13, 2012 at 5:58 PM, Richard Hipp  wrote:

> On Fri, Jan 13, 2012 at 4:49 PM, John Elrick  >wrote:
>
> >
> > 3.6.17
> >
> > Procedure   % TimeTimeCalls
> > _sqlite3_step   58.4%  1.795,052
> > _memcpy 22.8%  0.691,342,957
> > _memset  7.8%  0.24  465,299
> > ...
> > _malloc  1.9%  0.06   95,505
> >
> >
> > 3.7.9
> >
> > Procedure   % TimeTimeCalls
> > _malloc 56.9% 44.396,975,335
> > _sqlite3_step   30.4% 23.685,052
> > _memcpy  4.8%  3.707,710,259
> >
>
> Very curious
>
> SQLite has lots of interfaces that can be used to determine performance and
> status information.  Some example code from the command-line shell that
> accesses this status information is here:
> http://www.sqlite.org/src/artifact/aa4183d4a5243d?ln=990-1076
>
> I would very much like to see some of these same stats from your
> application.  Do you think you could add some code like that found in the
> shell and give us some more insight into what is going on?
>
>
Richard, per your request:

Memory Used   : 7,905,536 (max 8,582,104) bytes
Page Cache Used   : 0 (max 0) pages
Page Cache Overflow   : 6,910,576 (max 6,911,600) bytes
Scratch Used  : 0 (max 0)
Scratch Overflow  : 0 (max 24,880) bytes
Malloc Size   : 500,042 bytes
Parser Stack  : 0
Page Cache Size   : 4,232 bytes
Scratch Size  : 24,880 bytes
Malloc Count  : 5,835 (max 6,499)
Lookaside Slots Used  : 500 (max 500)
Pager Heap Usage  : 6,873,408 bytes
Schema Heap Usage : 39,560 bytes
Statement Heap/Lookaside Usage: 806,592 bytes
Successful lookaside attempts : 4,888
Lookaside failures due to size: 3,782,307
Lookaside failures due to OOM : 4,090,019
Page cache hits   : 2,585,425
Page cache misses : 0
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:57, schrieb Richard Hipp:

Changes to the command-line shell so that it understands quoted fields have
now been checked in.



thanks - what about a possibility to recognize special characters (i.e. 
\NULL) or delimiter""delimiter or delimiterdelimiter as NULL during the 
import? I'm only asking because you started to introduce this luxury 
feature ;-)


greetings from a grateful user
Oliver


On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:


Oliver - thanks !

Hm so there is no way to specify (borrowing syntax from other DBs)
something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:


Am 16.01.2012 17:10, schrieb Udi Karni:

  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the

last

version I downloaded and unfortunately replaced with the latest...)




afaik this never worked with the original CLI (might be that you have

used

a fork that can do this)

I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a string
you're not using in your file - maybe a |)  and export without " as

markers

for text columns

if cant't influence the look of the source find and don't mind to do it
manually you can import into a spreadsheet program and use a reliable
delimiter without using "

if you like scripting you can create a little program with your favorite
language

greetings
Oliver




How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
  wrote:



On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

  "COL1","COL2"

"",""
"XX,X",""



Sorry, but the shell tool doesn't understand quotes in csv files.

Simon.


__**_

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

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] Fwd: [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 11:34 AM, James Pearson  wrote:

> I just updated my sqlite install from 3.7.5 with the 3.7.10 precompiled
> binaries for Mac OS X and find that the up arrow command recall isn't
> working.
>
> Searching for fixes online I can only find suggestions for correcting the
> issue by compiling sqlite myself. Is that the only way to get command
> recall working again?
>

I don't know how to get command-line editing working on a mac even
compiling it myself.  Can you send me links to instructions on how to add
command-line editing to Mac programs?  If so, I'll try to add this to the
precompiled binaries.


-- 
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] makefile for c

2012-01-16 Thread Dan Kennedy

On 01/16/2012 04:17 AM, Bill McCormick wrote:

Tim Streater wrote, On 1/15/2012 3:00 PM:

On 15 Jan 2012 at 20:44, Bill McCormick wrote:


What is the problem with the shared lib stuff?

Thanks!!
Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:

A simple one -- and please compile sqlite3.c into your program and make
everybody happy.

Forget the shared library stuff as we have just been talking about.

The problem is that the computer vendor installs a shared lib with a
version of the library. Some 3rd party app installer then replaced
that shared lib with another version, and existing apps don't like it.

SQLite is small enough that it can be compiled and linked in in its
entirety.

--
Cheers -- Tim


OK. I don't see this as a problem for my use case. It would be better
for me to stick with the shared libs.

What is the difference between the two libs: libsqlite.so.0 and
libsqlite3.so.0?


"libsqlite.so.0" is probably sqlite version 2. It's around for
compatibility only, you don't want to use it for new programs.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 4:49pm, Udi Karni wrote:

> Hm so there is no way to specify (borrowing syntax from other DBs)
> something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

To import fields which contain commas use a delimiter other than a comma to 
separate your fields and preceed your .import command with a .separator 
command.  Or write your own importer and use that instead of the shell tool.

The .import command isn't SQLite.  It has nothing to do with the SQL API, it's 
just a feature built into the command-line tool.  It's very primitive and 
doesn't deal much of anything besides very simple delimited fields with one 
record per line of text.

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Richard Hipp
Changes to the command-line shell so that it understands quoted fields have
now been checked in.

On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:

> Oliver - thanks !
>
> Hm so there is no way to specify (borrowing syntax from other DBs)
> something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?
>
> On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:
>
> > Am 16.01.2012 17:10, schrieb Udi Karni:
> >
> >  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the
> last
> >> version I downloaded and unfortunately replaced with the latest...)
> >>
> >
> >
> > afaik this never worked with the original CLI (might be that you have
> used
> > a fork that can do this)
> >
> > I see 3 solutions:
> >
> > if you can influence the delimiter take a reliable delimiter (a string
> > you're not using in your file - maybe a |)  and export without " as
> markers
> > for text columns
> >
> > if cant't influence the look of the source find and don't mind to do it
> > manually you can import into a spreadsheet program and use a reliable
> > delimiter without using "
> >
> > if you like scripting you can create a little program with your favorite
> > language
> >
> > greetings
> > Oliver
> >
> >
> >
> >> How, then, do you import character columns that contain commas (like
> >> addresses) from a .csv which uses commas as a delimiter?
> >>
> >> Thanks !
> >>
> >> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
> >>  wrote:
> >>
> >>
> >>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
> >>>
> >>>  "COL1","COL2"
>  "",""
>  "XX,X",""
> 
> >>>
> >>> Sorry, but the shell tool doesn't understand quotes in csv files.
> >>>
> >>> Simon.
> >>>
> >> __**_
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> 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


[sqlite] Fwd: [sqlite-announce] SQLite version 3.7.10

2012-01-16 Thread James Pearson
I just updated my sqlite install from 3.7.5 with the 3.7.10 precompiled 
binaries for Mac OS X and find that the up arrow command recall isn't 
working.


Searching for fixes online I can only find suggestions for correcting 
the issue by compiling sqlite myself. Is that the only way to get 
command recall working again?


Thanks,
James


Forwarded message:


From: D. Richard Hipp 
To: sqlite-annou...@sqlite.org
Subject: [sqlite-announce] SQLite version 3.7.10

SQLite version 3.7.10, a regularly scheduled maintenance release, is 
now available on the SQLite website:


  http://www.sqlite.org/

There is a changelog at http://www.sqlite.org/releaselog/3_7_10.html 
and additional commentary on this release at 
http://www.sqlite.org/news.html


Please send email to sqlite-users@sqlite.org or directly to me if you 
encounter any problems with this release.


D. Richard Hipp
d...@hwaci.com



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

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:49, schrieb Udi Karni:

Oliver - thanks !
Hm so there is no way to specify (borrowing syntax from other
DBs) something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?


yes, no way :-)

if you want to discover the possibilities of the CLI type .h (after 
having started with sqlite3)


Oliver



On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters > wrote:

Am 16.01.2012 17:10, schrieb Udi Karni:

Simon - thanks - but this used to work on 3.7.7.1 (I believe was
the last
version I downloaded and unfortunately replaced with the latest...)



afaik this never worked with the original CLI (might be that you
have used a fork that can do this)

I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a
string you're not using in your file - maybe a |)  and export
without " as markers for text columns

if cant't influence the look of the source find and don't mind to do
it manually you can import into a spreadsheet program and use a
reliable delimiter without using "

if you like scripting you can create a little program with your
favorite language

greetings
Oliver



How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon
Slavin>  wrote:


On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

"COL1","COL2"
"",""
"XX,X",""


Sorry, but the shell tool doesn't understand quotes in csv
files.

Simon.

_
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] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Oliver - thanks !

Hm so there is no way to specify (borrowing syntax from other DBs)
something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:

> Am 16.01.2012 17:10, schrieb Udi Karni:
>
>  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
>> version I downloaded and unfortunately replaced with the latest...)
>>
>
>
> afaik this never worked with the original CLI (might be that you have used
> a fork that can do this)
>
> I see 3 solutions:
>
> if you can influence the delimiter take a reliable delimiter (a string
> you're not using in your file - maybe a |)  and export without " as markers
> for text columns
>
> if cant't influence the look of the source find and don't mind to do it
> manually you can import into a spreadsheet program and use a reliable
> delimiter without using "
>
> if you like scripting you can create a little program with your favorite
> language
>
> greetings
> Oliver
>
>
>
>> How, then, do you import character columns that contain commas (like
>> addresses) from a .csv which uses commas as a delimiter?
>>
>> Thanks !
>>
>> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
>>  wrote:
>>
>>
>>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
>>>
>>>  "COL1","COL2"
 "",""
 "XX,X",""

>>>
>>> Sorry, but the shell tool doesn't understand quotes in csv files.
>>>
>>> Simon.
>>>
>> __**_
> 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] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:10, schrieb Udi Karni:

Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
version I downloaded and unfortunately replaced with the latest...)



afaik this never worked with the original CLI (might be that you have 
used a fork that can do this)


I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a string 
you're not using in your file - maybe a |)  and export without " as 
markers for text columns


if cant't influence the look of the source find and don't mind to do it 
manually you can import into a spreadsheet program and use a reliable 
delimiter without using "


if you like scripting you can create a little program with your favorite 
language


greetings
Oliver



How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin  wrote:



On 16 Jan 2012, at 3:34pm, Udi Karni wrote:


"COL1","COL2"
"",""
"XX,X",""


Sorry, but the shell tool doesn't understand quotes in csv files.

Simon.

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
version I downloaded and unfortunately replaced with the latest...)

How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin  wrote:

>
> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
>
> > "COL1","COL2"
> > "",""
> > "XX,X",""
>
> Sorry, but the shell tool doesn't understand quotes in csv files.
>
> Simon.
> ___
> 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] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Mon, Jan 16, 2012 at 10:33 AM, Richard Hipp  wrote:

> On Mon, Jan 16, 2012 at 10:29 AM, John Elrick  >wrote:
>
> >
> >
> > > SQLite has lots of interfaces that can be used to determine performance
> > and
> > > status information.  Some example code from the command-line shell that
> > > accesses this status information is here:
> > > http://www.sqlite.org/src/artifact/aa4183d4a5243d?ln=990-1076
> > >
> > > I would very much like to see some of these same stats from your
> > > application.  Do you think you could add some code like that found in
> the
> > > shell and give us some more insight into what is going on?
> > >
> > >
> > Richard,
> >
> > I created this code and am in the process of gathering preliminary
> > statistics.  However, I am getting a
> >
> > SQLITE_MISUSE 21 /* Library used incorrectly */
> >
> > when I attempt to use the current _sqlite3_status interface with 3.6.17.
> >  If you could tell me the interface for that version, I'll add
> conditionals
> > so we can compare the results of the two.
> >
>
> Some of the SQLITE_DB_STATUS macros have been added after 3.6.17. If you
> try to use them on 3.6.17, you'll get a MISUSE error.  Really - you ought
> to be getting a compile-time error because the symbols don't exist, but I
> bet you are using the 3.7.9 header files with the 3.6.17 library.
>
>
You're forgetting I'm using Delphi.  I have no access to the .h file.  I
have to recreate the constants in the Delphi units from the documentation
on the site.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

> "COL1","COL2"
> "",""
> "XX,X",""

Sorry, but the shell tool doesn't understand quotes in csv files.

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


[sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
C:\>type k:\data\test.csv
"COL1","COL2"
"",""
"XX,X",""

C:\>sqlite3 k:\db\testdb

SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"

sqlite> .separator ','
sqlite>
sqlite> CREATE TABLE TEST (COL1 CHAR (4), COL2 CHAR (4));
sqlite>
sqlite> .import k:\\data\\test.csv TEST

Error: k:\data\test.csv line 3: expected 2 columns of data but found 3

===

The 1st line is the titles and is accepted
The 2nd line has 2 simple character values and is accepted
The 3rd line is rejected because sqlite seems to take the comma in the
first column as a delimiter thinking there are 3 values in that line while
it expects only 2

This used to work in 3.7.7.1.

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 10:29 AM, John Elrick wrote:

>
>
> > SQLite has lots of interfaces that can be used to determine performance
> and
> > status information.  Some example code from the command-line shell that
> > accesses this status information is here:
> > http://www.sqlite.org/src/artifact/aa4183d4a5243d?ln=990-1076
> >
> > I would very much like to see some of these same stats from your
> > application.  Do you think you could add some code like that found in the
> > shell and give us some more insight into what is going on?
> >
> >
> Richard,
>
> I created this code and am in the process of gathering preliminary
> statistics.  However, I am getting a
>
> SQLITE_MISUSE 21 /* Library used incorrectly */
>
> when I attempt to use the current _sqlite3_status interface with 3.6.17.
>  If you could tell me the interface for that version, I'll add conditionals
> so we can compare the results of the two.
>

Some of the SQLITE_DB_STATUS macros have been added after 3.6.17. If you
try to use them on 3.6.17, you'll get a MISUSE error.  Really - you ought
to be getting a compile-time error because the symbols don't exist, but I
bet you are using the 3.7.9 header files with the 3.6.17 library.

If you can just get us the status information when running 3.7.9 (or 3.7.10
- now available on the website) that will be a big clue by itself.




> ___
> 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] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Fri, Jan 13, 2012 at 5:58 PM, Richard Hipp  wrote:

> On Fri, Jan 13, 2012 at 4:49 PM, John Elrick  >wrote:
>

SNIP


> SQLite has lots of interfaces that can be used to determine performance and
> status information.  Some example code from the command-line shell that
> accesses this status information is here:
> http://www.sqlite.org/src/artifact/aa4183d4a5243d?ln=990-1076
>
> I would very much like to see some of these same stats from your
> application.  Do you think you could add some code like that found in the
> shell and give us some more insight into what is going on?
>
>
Richard,

I created this code and am in the process of gathering preliminary
statistics.  However, I am getting a

SQLITE_MISUSE 21 /* Library used incorrectly */

when I attempt to use the current _sqlite3_status interface with 3.6.17.
 If you could tell me the interface for that version, I'll add conditionals
so we can compare the results of the two.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] savepoint

2012-01-16 Thread Vivien Malerba
2012/1/16 Csaba Jeney 

> Is there any way to query the valid savepoints? At least their names?
> Many thanks.
>
>
AFAIK, the only way to do this is to keep track of each begin, rollback,
add savepoint, ... executed, to always know where you are.
(Anyway this is what's done in Libgda).

Regards,

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


Re: [sqlite] makefile for c

2012-01-16 Thread Black, Michael (IS)
If you insist on using the shared library instead of compiling in as we all 
recommend you don't need to worry about the different file extensions on the 
shared libraries.  There are no options when linking the shared libary.



CFLAGS=-O
OBJECTS=myapp.o
LIBS=-lsqlite3 -lpthread -ldl
myapp:  $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LIBS)



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Bill McCormick [wpmccorm...@gmail.com]
Sent: Sunday, January 15, 2012 3:17 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] makefile for c

Tim Streater wrote, On 1/15/2012 3:00 PM:
> On 15 Jan 2012 at 20:44, Bill McCormick  wrote:
>
>> What is the problem with the shared lib stuff?
>>
>> Thanks!!
>> Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
>>> A simple one -- and please compile sqlite3.c into your program and make
>>> everybody happy.
>>>
>>> Forget the shared library stuff as we have just been talking about.
> The problem is that the computer vendor installs a shared lib with a version 
> of the library. Some 3rd party app installer then replaced that shared lib 
> with another version, and existing apps don't like it.
>
> SQLite is small enough that it can be compiled and linked in in its entirety.
>
> --
> Cheers  --  Tim

OK. I don't see this as a problem for my use case. It would be better
for me to stick with the shared libs.

What is the difference between the two libs: libsqlite.so.0 and
libsqlite3.so.0? I assume that I'll be linking to libsqlite3.

What about options? Is there a makefile example out there somewhere?

Thanks!!
___
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] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Mon, Jan 16, 2012 at 5:37 PM, John Elrick wrote:

> > is this test ok for you (still showing bad performance)?
> >
> > On my side it's about 800 ms for 3.7.9 static and about 6000 memory calls
> > during the query. For 3.6.20 the number of calls ~  7000, the time is
> > similar.
> >
> >
> Your test was hard coded.  Mine uses bindings.  However, I'm not arguing
> that something odd is going on.  I'm just trying to understand what.
>

Ok, I did a test with bindings
This was query
  UPDATE RESPONSES SET RESPONSE_NAME = ?, prelisted_value=? WHERE
RESPONSE_OID = ?
with 5000 rows where both strings were 'abc' and the numbers - random ids
(existing)

I noticed similar results when the results are system-cached (second and
following test in sqlite even after reopening), but when I force resetting
system cache (windows cache, not sqlite), the time is about 7-11 seconds.
But I think a test db with test data would be more useful for
understanding. Can you upload it?

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


Re: [sqlite] sqlite3_bind. error as library routine called out of sequence.

2012-01-16 Thread Black, Michael (IS)
You have to do all the binds together, THEN step.  This works for me.



#include 
#include 
#include 
#include "sqlite3.h"

int main()
{
  sqlite3 *db;
  sqlite3_stmt *stmt;
  int status;
  char *create = "create table 
ONTTable(slotId,ponChannelId,onuType,onuId,adminStatus);";
char *query = "insert into ONTTable 
(slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";

  
status=sqlite3_open_v2("test.db",,SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE,NULL);
  if (status != SQLITE_OK)  {
printf("open error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  sqlite3_exec(db,create,NULL,NULL,NULL);
  status=sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
  if (status != SQLITE_OK) {
printf("prepare error:%s\n",sqlite3_errmsg(db));
exit(1);
  }

  status=sqlite3_bind_int(stmt,1,1);
  if (status != SQLITE_OK) {
printf("bind1 error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  status=sqlite3_bind_int(stmt,2,2);
  if (status != SQLITE_OK) {
printf("bind2 error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  status=sqlite3_bind_int(stmt,3,3);
  if (status != SQLITE_OK) {
printf("bind3 error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  status=sqlite3_bind_int(stmt,4,4);
  if (status != SQLITE_OK) {
printf("bind4 error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  status=sqlite3_bind_int(stmt,5,5);
  if (status != SQLITE_OK) {
printf("bind5 error:%s\n",sqlite3_errmsg(db));
exit(1);
  }

  status=sqlite3_step(stmt);
  if (status != SQLITE_DONE) {
printf("step error:%s\n",sqlite3_errmsg(db));
exit(1);
  }
  return 0;
}



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of bhaskarReddy [uni...@gmail.com]
Sent: Monday, January 16, 2012 7:46 AM
To: sqlite-users@sqlite.org
Subject: EXT :[sqlite] sqlite3_bind. error as library routine called out of 
sequence.


Hi Friends,

  When i tried,
 query = "insert into ONTTable
(slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";
then binding each parameter.

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> slotId);
sqlite3_step(stmt,DONE);

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
sqlite3_step(stmt,DONE);

//sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ontType);
sqlite3_step(stmt,DONE);

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> onuId);
sqlite3_step(stmt,DONE);

//sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> adminStatus);

I am getting the following error.
sqilte3_bind_int(stmt,1,ontTable -> ponChannelId) failed with status 21:
library routine called out of sequence.



Regards,
Bhaskar Reddy.

--
View this message in context: 
http://old.nabble.com/sqlite3_bind.-error-as-library-routine-called-out-of-sequence.-tp33147572p33147572.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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3_bind. error as library routine called out of sequence.

2012-01-16 Thread bhaskarReddy

Hi Friends,

  When i tried,
 query = "insert into ONTTable
(slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";   
then binding each parameter.

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> slotId);
sqlite3_step(stmt,DONE);

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
sqlite3_step(stmt,DONE);
 
//sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ontType);
sqlite3_step(stmt,DONE);

//sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> onuId);
sqlite3_step(stmt,DONE);

//sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> adminStatus);

I am getting the following error.
sqilte3_bind_int(stmt,1,ontTable -> ponChannelId) failed with status 21:
library routine called out of sequence.

   

Regards,
Bhaskar Reddy.

-- 
View this message in context: 
http://old.nabble.com/sqlite3_bind.-error-as-library-routine-called-out-of-sequence.-tp33147572p33147572.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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread John Elrick
On Mon, Jan 16, 2012 at 4:37 AM, Max Vlasov  wrote:

> On Sun, Jan 15, 2012 at 3:35 AM, John Elrick  >wrote:
>
> > On Fri, Jan 13, 2012 at 5:13 PM, Max Vlasov 
> wrote:
> >
> > 5,008 calls to
> >
> > UPDATE RESPONSES SET
> > RESPONSE_NAME = :RESPONSE_NAME,
> > prelisted_value = :prelisted_value
> > WHERE RESPONSE_OID = :RESPONSE_OID
> >
> > 3.6.17: 382 ms
> > 3.7.9: 5,924 ms
> >
> >
>
> John, I did a test reproducing your job with 8 inserts
>  insert into responses default values
>
> and making 5000 calls in transaction
>
> UPDATE RESPONSES SET RESPONSE_NAME = '12345', prelisted_value='12345'
> WHERE RESPONSE_OID = abs(random() % 8)
>
> is this test ok for you (still showing bad performance)?
>
> On my side it's about 800 ms for 3.7.9 static and about 6000 memory calls
> during the query. For 3.6.20 the number of calls ~  7000, the time is
> similar.
>
>
Your test was hard coded.  Mine uses bindings.  However, I'm not arguing
that something odd is going on.  I'm just trying to understand what.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] All values of a fields are not stored in the single record.

2012-01-16 Thread bhaskarReddy

Hi Mr. Black,

I tried what you recommend me. But i am getting error as, 
sqilte3_bind_int(stmt,2,ontTable -> ponChannelId) failed with status 21:
library routine called out of sequence.

Regards,
Bhaskar Reddy.
 


Black, Michael (IS) wrote:
> 
> You did 5 inserts and got 5 records.  You need to do either just ONE
> insert or ONE insert and FOUR updates.
> 
> I'd got for the one insert.
> 
> 
> 
> query = "insert into ONTTable
> (slotId,ponChannelId,onuType,onuId,adminStatus) values (?1,?2,?3,?4,?5);";
> then bind each parameter.
> 
> 
> 
> Michael D. Black
> 
> Senior Scientist
> 
> Advanced Analytics Directorate
> 
> Advanced GEOINT Solutions Operating Unit
> 
> Northrop Grumman Information Systems
> 
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
> behalf of bhaskarReddy [uni...@gmail.com]
> Sent: Monday, January 16, 2012 7:10 AM
> To: sqlite-users@sqlite.org
> Subject: EXT :[sqlite] All values of a fields are not stored in the single
> record.
> 
> 
> Hi friends,
> 
>  While i am writing data into the table the values are not storing
> in a single records, instead the values are storing in improper order.
> 
>   I am adding the values to the table as,
> 
> query = "insert into ONTTable (slotId) values (?1);";
> sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> slotId);
> sqlite3_step(stmt,DONE);
> 
> query = "insert into ONTTable (ponChannelId) values (?);";
> sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
> sqlite3_step(stmt,DONE);
> 
> 
> query = "insert into ONTTable (onuType) values (?);";
> sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> ontType);
> sqlite3_step(stmt,DONE);
> 
> query = "insert into ONTTable (onuId) values (?);";
> sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> onuId);
> sqlite3_step(stmt,DONE);
> 
> query = "insert into ONTTable (adminStatus) values (?);";
> sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
> sqlite3_bind_int(stmt,1,ontTable -> adminStatus);
> 
> 
> slotId   ponChannelId onuType   onuId
> adminStatus
> 
> 1
> 
> 2
> 
> 
>3
> 
>  4
> 
> 
> 5
> 
> 
> 
> 
> 
> 
>  Can any one tell me how i can get all values at one record.
> 
> 
> Regards
> Bhaskar Reddy
> 
> --
> View this message in context:
> http://old.nabble.com/All-values-of-a-fields-are-not-stored-in-the-single-record.-tp33147362p33147362.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-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/All-values-of-a-fields-are-not-stored-in-the-single-record.-tp33147362p33147453.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


Re: [sqlite] All values of a fields are not stored in the single record.

2012-01-16 Thread Black, Michael (IS)
You did 5 inserts and got 5 records.  You need to do either just ONE insert or 
ONE insert and FOUR updates.

I'd got for the one insert.



query = "insert into ONTTable (slotId,ponChannelId,onuType,onuId,adminStatus) 
values (?1,?2,?3,?4,?5);";
then bind each parameter.



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of bhaskarReddy [uni...@gmail.com]
Sent: Monday, January 16, 2012 7:10 AM
To: sqlite-users@sqlite.org
Subject: EXT :[sqlite] All values of a fields are not stored in the single 
record.


Hi friends,

 While i am writing data into the table the values are not storing
in a single records, instead the values are storing in improper order.

  I am adding the values to the table as,

query = "insert into ONTTable (slotId) values (?1);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> slotId);
sqlite3_step(stmt,DONE);

query = "insert into ONTTable (ponChannelId) values (?);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
sqlite3_step(stmt,DONE);


query = "insert into ONTTable (onuType) values (?);";
sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ontType);
sqlite3_step(stmt,DONE);

query = "insert into ONTTable (onuId) values (?);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> onuId);
sqlite3_step(stmt,DONE);

query = "insert into ONTTable (adminStatus) values (?);";
sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> adminStatus);


slotId   ponChannelId onuType   onuId
adminStatus

1

2


   3

 4


5






 Can any one tell me how i can get all values at one record.


Regards
Bhaskar Reddy

--
View this message in context: 
http://old.nabble.com/All-values-of-a-fields-are-not-stored-in-the-single-record.-tp33147362p33147362.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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] All values of a fields are not stored in the single record.

2012-01-16 Thread bhaskarReddy

Hi friends,

 While i am writing data into the table the values are not storing
in a single records, instead the values are storing in improper order. 

  I am adding the values to the table as,

query = "insert into ONTTable (slotId) values (?1);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> slotId);
sqlite3_step(stmt,DONE);
 
query = "insert into ONTTable (ponChannelId) values (?);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ponChannelId);
sqlite3_step(stmt,DONE);
 
 
query = "insert into ONTTable (onuType) values (?);";
sqlite_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> ontType);
sqlite3_step(stmt,DONE);

query = "insert into ONTTable (onuId) values (?);";
sqlite3_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> onuId);
sqlite3_step(stmt,DONE);

query = "insert into ONTTable (adminStatus) values (?);";
sqlite3_bind_prepare_v2(db,query,strlen(query)+1, , NULL);
sqlite3_bind_int(stmt,1,ontTable -> adminStatus);


slotId   ponChannelId onuType   onuId
adminStatus

1

2
   

   3

 4


 
5
  





 Can any one tell me how i can get all values at one record.


Regards
Bhaskar Reddy

-- 
View this message in context: 
http://old.nabble.com/All-values-of-a-fields-are-not-stored-in-the-single-record.-tp33147362p33147362.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] Need help with adding Update Callback for node-sqlite

2012-01-16 Thread Ashwini Jadhav
I am not sure if this is the correct mailing list to ask this question. If
not, please redirect me to the correct forum.

 

I am using Node js with node-sqlite extension. I tried to use the commented
out caode in node-sqlite to add an update callback. On running the code I am
getting a segmentation fault. What should I do?

 

Thanks! 

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


Re: [sqlite] SSD with TRIM

2012-01-16 Thread Black, Michael (IS)
For this particular test cache_size didn't matter much...actually ran a touch 
faster with smaller cache (although may be within the margin of error)



I dropped the cache_size to 125 pages (which matches the 16X increase in page 
size that I did)



On SSD:

time sqlite3 gen.db 
int
main ()
{
  int i;
  char s[513];
  for (i = 0; i < 512; ++i)
s[i] = '0';
  s[512] = 0;

  printf("pramga page_size=16384;\n");
  printf("pramga cache_size=125;\n");
  printf("CREATE TABLE [TestTable] ( [Id] INTEGER PRIMARY KEY AUTOINCREMENT, 
[Text] TEXT);\n");
  printf("begin;\n");
  for (i = 0; i < 100; ++i) {
printf ("INSERT INTO TestTable (id, text) VALUEs (abs(random() %% (1 << 
48)), '%s');\n", s);
  }
  printf("commit;\n");
  return 0;
}



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Simon Slavin [slav...@bigfraud.org]
Sent: Monday, January 16, 2012 3:53 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] SSD with TRIM


On 16 Jan 2012, at 7:18am, Max Vlasov wrote:

> Michael, thanks for the info, your tests confirms some advantages of ssd,
> at least on some of the current platform (linux, can you confirm?).
> Probably the page size is a parameter that also should be adjusted for
> optimal performance. I suppose it can be different for different ssd
> models, but it's just a guess.

Optimal page size is related to cache size.  And the design of standard desktop 
computers means you have at least two levels of cache between your CPU and your 
hard disk surface.  And your SQLite app may not be the only thing running on 
the computer that wants frequent disk access.  So figuring out an optimal page 
size isn't easy.

Simon.
___
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] SSD with TRIM

2012-01-16 Thread Black, Michael (IS)
Yes...Linuxforgot to mention that.



Also Intel E5405 @ 2.00Ghz -- 8 processors and 32G mem in an HP Blade on local 
storage.  System was pretty well I/O bound.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Max Vlasov [max.vla...@gmail.com]
Sent: Monday, January 16, 2012 1:18 AM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] SSD with TRIM

On Mon, Jan 16, 2012 at 12:29 AM, Black, Michael (IS) <
michael.bla...@ngc.com> wrote:

>
> On SSD with 16384 page size and no WAL mode:
>
> time sqlite3 gen.db 
> real4m4.816s ...
> Note: Database is only 595M with this page size.  Much more efficient
> storage may explain most of the time difference.
> ...
>
> On hard drive with 16384 page size and no WAL mode (now you can see the
> SSD latency advantage):
>
> time sqlite3 gen.db 
> real17m18.919s
>
>
Michael, thanks for the info, your tests confirms some advantages of ssd,
at least on some of the current platform (linux, can you confirm?).
Probably the page size is a parameter that also should be adjusted for
optimal performance. I suppose it can be different for different ssd
models, but it's just a guess.

Max
___
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] SSD with TRIM

2012-01-16 Thread Black, Michael (IS)
Yup...I'm sure...



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Peter Aronson [pbaron...@att.net]
Sent: Sunday, January 15, 2012 4:18 PM
To: 'General Discussion of SQLite Database'
Subject: EXT :Re: [sqlite] SSD with TRIM

You know, on some platforms, such as Solaris, /tmp can be configured to use
memory instead of disk (called tmpfs on many unix variants).  Are you sure
your /tmp is actually using disk?  It's the default in a lot of setups.

Best

Peter

> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Black, Michael (IS)
> Sent: Sunday, January 15, 2012 12:35 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] SSD with TRIM
>
> I ran your test on my SSD system with 1M inserts.  I used WAL mode.
>
> pragma journal_mode=WAL;
> CREATE TABLE [TestTable] (
> [Id] INTEGER PRIMARY KEY AUTOINCREMENT,
> [Text] TEXT
> );
> begin;
> insert.
>
> end;
>
>
>
>
>
> On SSD:
>
> time sqlite3 gen.db  wal
>
> real3m35.462s
> user2m14.126s
> sys 1m10.718s
>
> On same machine but on /tmp
>
> time sqlite3 gen.db  wal
> real3m44.259s
> user2m15.960s
> sys 1m9.437s
>
> Or did you have some other test in mind?
>
>
>
> Michael D. Black
>
> Senior Scientist
>
> Advanced Analytics Directorate
>
> Advanced GEOINT Solutions Operating Unit
>
> Northrop Grumman Information Systems
>
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
> behalf of Max Vlasov [max.vla...@gmail.com]
> Sent: Saturday, January 14, 2012 1:24 PM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] SSD with TRIM
>
> On Sat, Jan 14, 2012 at 6:12 AM, Simon Slavin 
> wrote:
>
> >
> > Fast.  Fasty fast.  Speed is high.  INSERT, UPDATE, and DELETE all
> > significantly faster.  SELECT is a bit faster, but there's less
> difference.
> >
> >
> Simon, very interesting. Can you make some tests related to internal
> fragmentation? As an advanced user of sqlite,  you probably will easily
> invent your own tests :), but if not  there is a test I used at least once
>
> INSERT INTO TestTable (id, text) VALUEs (abs(random() % (1 << 48)),
> '12345678901234567...') {the text is about 512 bytes long}
>
> 1,000,000 inserts should create a 1GB base and the time with general hd
> was
> above 15 minutes, maybe even half an hour. So I'm very interested to see
> was there any progress with overall ssd performance.
>
> Thanks,
>
> Max
> ___
> 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
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SSD with TRIM

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 7:18am, Max Vlasov wrote:

> Michael, thanks for the info, your tests confirms some advantages of ssd,
> at least on some of the current platform (linux, can you confirm?).
> Probably the page size is a parameter that also should be adjusted for
> optimal performance. I suppose it can be different for different ssd
> models, but it's just a guess.

Optimal page size is related to cache size.  And the design of standard desktop 
computers means you have at least two levels of cache between your CPU and your 
hard disk surface.  And your SQLite app may not be the only thing running on 
the computer that wants frequent disk access.  So figuring out an optimal page 
size isn't easy.

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


Re: [sqlite] Some pieces of the puzzle are coming together

2012-01-16 Thread Max Vlasov
On Sun, Jan 15, 2012 at 3:35 AM, John Elrick wrote:

> On Fri, Jan 13, 2012 at 5:13 PM, Max Vlasov  wrote:
>
> 5,008 calls to
>
> UPDATE RESPONSES SET
> RESPONSE_NAME = :RESPONSE_NAME,
> prelisted_value = :prelisted_value
> WHERE RESPONSE_OID = :RESPONSE_OID
>
> 3.6.17: 382 ms
> 3.7.9: 5,924 ms
>
>

John, I did a test reproducing your job with 8 inserts
  insert into responses default values

and making 5000 calls in transaction

UPDATE RESPONSES SET RESPONSE_NAME = '12345', prelisted_value='12345'
WHERE RESPONSE_OID = abs(random() % 8)

is this test ok for you (still showing bad performance)?

On my side it's about 800 ms for 3.7.9 static and about 6000 memory calls
during the query. For 3.6.20 the number of calls ~  7000, the time is
similar.

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


Re: [sqlite] savepoint

2012-01-16 Thread Dan Kennedy

On 01/16/2012 03:31 PM, Csaba Jeney wrote:

Is there any way to query the valid savepoints? At least their names?


No way to do that at present.

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


[sqlite] savepoint

2012-01-16 Thread Csaba Jeney
Is there any way to query the valid savepoints? At least their names?
Many thanks.

Csaba




This message is intended to be confidential and may be privileged. If
you are not the intended recipient, please delete this e-mail from your
system immediately and notify us of the erroneous transmission to you.
Any unauthorized disclosure, use, copying, or distribution of this
E-mail is prohibited.

Please consider your environmental responsibility before printing this
e-mail.



Ez az üzenet és bármely melléklete kizárólag a címzettnek szól.
Tartalmazhat bizalmas, szellemi tulajdonnak minősülő illetve más jogvédett
információkat vagy egyéb módon lehet védve jogszabályok által. Ha nem Ön a
szándékozott címzettje, nem használhatja fel,nem hozhatja nyilvánosságra és
nem másolhatja ezt az üzenetet, annak mellékletét vagy bármely részét, és
nem cselekedhet az üzenet tartalmában bízva. Ebben az esetben kérjük,
értesítse a feladót haladéktalanul, és törölje ezt az üzenetet és minden
mellékletét rendszerébõl. A levél és tartalmának, felhatalmazás nélküli,
másolása, arhíválása jogellenes.
A levél nyomtatásakor, kérjük, vegye figyelembe a környezetünk védelmét.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users