[sqlite] Trying to use in-memory database

2014-02-19 Thread Jeff Archer
Long time SQLite user but I don't think I have ever tried to do an in-memory database before. Just upgraded to 3.8.3.1 but I am not having any other failures with existing code so I don't think that is any part of the problem. I am trying to open the database with sqlite3_open16() using a filename

Re: [sqlite] Path Length Limit on Windows

2013-08-29 Thread Jeff Archer
Date: Wed, 28 Aug 2013 14:21:24 -0400 From: Richard Hipp d...@sqlite.org The latest check-in on trunk adds a new windows VFS module called win32-longpath which accepts the full-length 32KB pathnames. Add the string win32-longpath as the 4th argument to sqlite3_open_v2() (on windows only, of

Re: [sqlite] Support SQLite in México

2013-04-30 Thread Jeff Archer
SQLite3 in my product since 2009. Highly recommended. Jeff Archer Vice President of Software Engineering Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] How to achieve fastest possible write performance for a strange and limited case

2013-04-04 Thread Jeff Archer
Thanks for everyone's help and thoughts on this issue. My findings on Windows 7 Pro 64 using a PCI based SSD is that for my smallish image the BLOBs were faster than individual files. Basically, in line with a table that someone posted earlier in this thread. After many experiments, with many

Re: [sqlite] Performance with journal_mode = off

2013-03-29 Thread Jeff Archer
From: James K. Lowden jklow...@schemamania.org To: sqlite-users@sqlite.org Your experiment is telling you different: transaction control costs more than I/O. But shouldn't transactions be disabled when journal_mode = off? Maybe that is a faulty assumption. If so, what is the point of

[sqlite] How to achieve fastest possible write performance for a strange and limited case

2013-03-29 Thread Jeff Archer
I have previously made an apparently bad assumption about this so now I would like to go back to the beginning of the problem and ask the most basic question first without any preconceived ideas. This use case is from an image processing application. I have a large amount of intermediate data

Re: [sqlite] Performance with journal_mode = off

2013-03-29 Thread Jeff Archer
Date: Thu, 28 Mar 2013 14:13:51 +0100 From: ibrahim ibrahim.a...@googlemail.com ... You should compare a) Journal mode=on w/wo single transaction b) Journal mode=off w/wo single transaction So, this means I can use transaction when I have journal_mode = off? I did not understand that this was

Re: [sqlite] Performance with journal_mode = off

2013-03-29 Thread Jeff Archer
On Fri, Mar 29, 2013 at 4:05 PM, Simon Slavin slav...@bigfraud.org wrote: No. The two things have nothing to do with one-another. Transactions are about grouping changes together so that either they all happen or none happen. Journalling is about surviving through crashes and power-failures,

Re: [sqlite] How to achieve fastest possible write performance for a strange and limited case

2013-03-29 Thread Jeff Archer
On Fri, Mar 29, 2013 at 4:46 PM, Richard Hipp d...@sqlite.org wrote: On Fri, Mar 29, 2013 at 4:41 PM, Michael Black mdblac...@yahoo.com wrote: I think many people would tell you not to store your images in your database. Just store a filepath to them. That will speed things up quite a bit

Re: [sqlite] Performance with journal_mode = off

2013-03-28 Thread Jeff Archer
On Wed, Mar 27, 2013 at 6:35 PM, Simon Slavin slav...@bigfraud.org wrote: Reasonable figures. With 5764 writes to the disk in separates transactions you have quite a lot of reading of data plus 5764 attempts to update the database file. The updates have to be done in the right order, and

Re: [sqlite] Performance with journal_mode = off

2013-03-28 Thread Jeff Archer
On Thu, Mar 28, 2013 at 8:35 AM, Niall O'Reilly niall.orei...@ucd.ie wrote: On 28 Mar 2013, at 12:09, Jeff Archer wrote: But my most basic question remains. Why is single transaction faster than PRAGMA journal_mode = off? Seems to me that with no journal there should only be single set

Re: [sqlite] Performance with journal_mode = off

2013-03-28 Thread Jeff Archer
On Thu, Mar 28, 2013 at 8:24 AM, ibrahim ibrahim.a...@googlemail.com wrote: On 28.03.2013 13:09, Jeff Archer wrote: On Wed, Mar 27, 2013 at 6:35 PM, Simon Slavin slav...@bigfraud.org wrote: Reasonable figures. With 5764 writes to the disk in separates transactions you have quite a lot

[sqlite] Question about behavior when journal_mode = off

2013-03-27 Thread Jeff Archer
If all connections (1 per thread) of all processes (multiple simultaneous) issue command PRAGMA journal_mode = off, is access to a common database file located on the local machine still synchronized correctly between the random accesses (reads and writes) occurring across all?

[sqlite] Performance with journal_mode = off

2013-03-27 Thread Jeff Archer
transactions (default atomic commit) it takes 17.7 seconds. When I set journal_mode = off, same operation takes 5.5 seconds. If I do all 5764 inserts within a single transaction only 2.5 seconds. Jeff Archer Vice President of Software Engineering Nanotronics Imaging jsarc...@nanotronicsimaging.com

Re: [sqlite] Performance with journal_mode = off

2013-03-27 Thread Jeff Archer
On Wed, Mar 27, 2013 at 5:46 PM, David King dk...@ketralnis.com wrote: I am populating a database with 5764 records using the exact same data set each time into a newly created file. When I use no explicit transactions (default atomic commit) it takes 17.7 seconds. When I set

[sqlite] Journal mode

2013-03-18 Thread Jeff Archer
Documentation doesn't make this clear. Does PRAGMA journal_mode = OFF; affect a single connection or will it affect all connections in my process? ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] SQLite4 questions

2013-03-07 Thread Jeff Archer
Will SQLite4 be capable of reading a SQLite3 database to facilitate upgrade? (I'm guessing 'no') I assume SQLite4 will be distributed in a familiar amalgamation format. Will it be feasible to include the amalgamation of both SQLite3 and SQLite4 into the same application to create an upgrade

[sqlite] ranking in a view

2013-02-09 Thread Jeff Archer
There was recently a post where someone was trying to update the ranking of records in a table and someone else presented a clever view which did the ranking and thus required no table update. I wanted to try and understand how this view worked but when I have looked back to find it, I can't.

[sqlite] The database disk image is malformed

2012-12-13 Thread Jeff Archer
in the C API that might be used to implement this functionality. Could someone please point me to some information on how I might make my product be able to recover from this situation. SQLite3 version 3.7.13 Windows 7 x64 Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615

[sqlite] Is it possible to get the amalgation as individual files

2012-09-21 Thread Jeff Archer
I assume that the amalgation exists as single files before it is combined into one file. Is is possible to get these individual files so that I can build a debug version because Visual Studio debugger does not handle well the 138244 line amalgation file? Jeff Archer Nanotronics Imaging jsarc

Re: [sqlite] Is it possible to get the amalgation as individual files

2012-09-21 Thread Jeff Archer
. trips me up. I was hoping there is a way to get the individual files after they have been formulated by the unix-like development tools but before they are combined into the amalgamation file. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615

Re: [sqlite] Is it possible to get the amalgation as individual files

2012-09-21 Thread Jeff Archer
On Fri, Sep 21, 2012 at 4:01 PM, Nico Williams n...@cryptonector.comwrote: Install Cygwin, use that to make the amalgamation (after you've made whatever changes to the canonical sources), then build the amalgation in native Windows. Please excuse my ignorance. OK. I have Cygwin. Fossil. I

[sqlite] SQLITE_CONFIG_LOG callback indicating SQLITE_SCHEMA (17) error

2012-07-09 Thread Jeff Archer
as it was created by the first process and I was assuming that the IF NOT EXISTS would be preventing it from actually doing anything but now I am believing that executing this statement even when the table exists is causing SQLite to think the schema has changed. Does this seem plausible? Jeff Archer

[sqlite] Not sure how to interrupt this

2012-06-29 Thread Jeff Archer
the SQLITE_CONFIG_LOG callback is inconsistent with the success indicated by SQLITE_DONE. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

[sqlite] Not sure how to interrupt this

2012-06-29 Thread Jeff Archer
Igor Tandetnik itandetnik at mvps.org Thu Jun 28 09:38:27 EDT 2012 My guess is that a) you have prepared your statement with sqlite3_prepare_v2 (as opposed to sqlite3_prepare)... Statement was prepared with sqlite3_prepare16_v2() Database file was created only moments earlier. Jeff Archer

[sqlite] Error indicated through SQLITE_CONFIG_LOG callback but sqlite3_step() does not fail

2012-06-29 Thread Jeff Archer
moments before. My biggest question is: Why after this error being indicate through the SQLITE_CONFIG_LOG callback would the sqlite3_step() succeeded? Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list

[sqlite] Error indicated through SQLITE_CONFIG_LOG callback but sqlite3_step() does not fail

2012-06-29 Thread Jeff Archer
Pavel Ivanov paivanof at gmail.com Fri Jun 29 17:06:42 EDT 2012 Because SQLite successfully re-prepared this statement behind the scenes and thus was able to successfully finish sqlite3_step() function. What could cause it to re-prepare the statement? Is this something I need to find and fix?

[sqlite] Error indicated through SQLITE_CONFIG_LOG callback but sqlite3_step() does not fail

2012-06-29 Thread Jeff Archer
Simon Slavin slavins at bigfraud.org Fri Jun 29 17:16:36 EDT 2012 Do you do the _prepare() first, then make a change to the database schema ? For instance Start of app Prepare the INSERT statement CREATE TABLE Bind the INSERT statement Step the INSERT statement No. Create Table Then in a

[sqlite] Not sure how to interrupt this

2012-06-28 Thread Jeff Archer
Igor Tandetnik itandetnik at mvps.org Thu Jun 28 09:38:27 EDT 2012 My guess is that a) you have prepared your statement with sqlite3_prepare_v2 (as opposed to sqlite3_prepare)... Statement was prepared with sqlite3_prepare16_v2() Database file was created only moments earlier. Jeff Archer

[sqlite] Not sure how to interrupt this

2012-06-28 Thread Jeff Archer
function, Execute(), that does the Prepare, Bind, Step, Reset, Finalize sequence. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

[sqlite] Not sure how to interrupt this

2012-06-27 Thread Jeff Archer
](ScanID, Timestamp, EndTime, Result) VALUES(NULL, @Timestamp, @Timestamp, @Result);] database schema has changed SQLITE_VERSION3.7.13 - amalgamation Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com ___ sqlite-users mailing list

[sqlite] Something strange

2012-06-22 Thread Jeff Archer
. Windows 7 64bit. Visual Studio 2010. Real HDD not SSD. The file is on local machine but is opened using a network path. i.e. \\MACHINENAME\Data\Calibration.db Thank you in advance for your time on this matter. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com

[sqlite] Compile Error

2011-05-03 Thread jeff archer
yy_reduce 1..\..\Bin\x64\Debug\SqlUtils.dll : fatal error LNK1120: 8 unresolved externals  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] Compiler Error

2011-05-03 Thread jeff archer
[-1].minor.yy203, all); Should be enclosed in...   #ifdef SQLITE_OMIT_TRIGGER sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, all); #endif  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list

[sqlite] SQLite3 memory leaks in my c++ dll application

2011-04-21 Thread jeff archer
positives in the leaked memory. Your said that your are using GetProcAddress() to make calls which makes me think you *may* be getting to these false positives.  Basically, I believe it comes down to allocating memory in one dll and deallocating in another. Jeff Archer Nanotronics Imaging jsarc

[sqlite] Building sqlite for windows in a proper way

2011-04-19 Thread jeff archer
builds run most code significantly slower than the release builds. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

[sqlite] What happens if you insert more than your RAM

2011-04-19 Thread jeff archer
insert more than your RAM size into an in memory database? (I'm particularly interested in the Windows context). Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http

[sqlite] What happens if you insert more than your RAM

2011-04-19 Thread jeff archer
Tue Apr 19 18:35:27 GMT 2011 Danny dragonslayer2k at yahoo.com Depends on access type.  If accessing sequentially, paging would be minimal, that is, you would process the segment that fits into memory, then page in another segment and process that, etc., etc. Even so it would now be accessed

Re: [sqlite] Help with error codes

2011-04-13 Thread Jeff Archer
() if the error is not ERROR_FILE_NOT_FOUND and this appears to eliminate the crash. Could someone please advise on how good or bad of an idea this change is? How well is SQLite tested on Windows 7 64 bit? Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819-4615

[sqlite] Help with error codes

2011-04-12 Thread jeff archer
sqlite3_extended_errcode()? Is 3338 an extended error code?Do I need to use sqlite3_open_v2 to get the extended error code?  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Help with error codes

2011-04-12 Thread jeff archer
has any ideas. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Lack of decimal support

2011-03-27 Thread jeff archer
From: Patrick Earl pate...@patearl.net Subject: Re: [sqlite] Lack of decimal support If SQLite can't decide on a base-10 format itself, perhaps the answer lies in enhancing the API to allow for custom type storage and operators.   So, like a virtual type interface.  This would be a nice feature. 

Re: [sqlite] How to delete all indexes

2011-03-17 Thread Jeff Archer
On Wed, Mar 16, 2011 at 5:59 PM, Simon Slavin slav...@bigfraud.org wrote: You should almost never be creating indexes on the fly.  Bear in mind that if SQLite finds a search that would be better with an index, it creates it itself and it is far better at working out the best index than you

[sqlite] How to delete all indexes

2011-03-16 Thread Jeff Archer
to accomplish this without resorting to explicit query of the sqlite_master table? Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819-4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

[sqlite] Query help

2011-03-01 Thread Jeff Archer
, Images.Y + Defects.Y as DefectY from Defects join Images on Defects.ImageID = Images.ImageID I believe that the data is all stored such that the first stored defect for each ImageID will have the lowest X,Y values. At least for now this assumption is probably good enough. Jeff

Re: [sqlite] Query help

2011-03-01 Thread Jeff Archer
From: Igor Tandetnik [mailto:itandet...@mvps.org] Sent: Tuesday, March 01, 2011 5:47 PM On 3/1/2011 5:01 PM, Jeff Archer wrote: And this select which I would like to modify to only return lowest X,Y value for each ImageID. What does lowest mean? If you have two points (100, 200) and (200

Re: [sqlite] Help with join

2011-02-20 Thread Jeff Archer
handy technique for me know as I am still a SQL beginner. -- Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Compiler warnings in R-Tree code under Visual

2011-02-19 Thread Jeff Archer
level possible and make it always compile warning free. Why would you NOT want the compiler to point out potential issues. This lets the developer basically make an approval by inserting a cast or whatever. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615

Re: [sqlite] Compiler warnings in R-Tree code under Visual Studio Express

2011-02-19 Thread Jeff Archer
to and including 2010 have issues with source files longer than 64K lines. The editing works OK but the debugger cannot locate code lines and it confuses Intellisense. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite

[sqlite] Help with join

2011-02-17 Thread jeff archer
Here is my existing schema.  I would like to change this and remove the NumDefects from the [Analysis] table. To do this I need to update the [vwAnalysis] view to determine the number of defects from the [Defects] table by the AnalysisID. I can't seem to get the right select for the new version

Re: [sqlite] Question about having 2 db connections on same

2011-02-14 Thread Jeff Archer
Date: Sun, 13 Feb 2011 22:14:29 -0500 From: Pavel Ivanov paiva...@gmail.com I do a transaction on connection 1 using BEGIN IMMEDIATE, some rows updated, COMMIT. Then, when I attempt same sequence on connection 2, when I do first call to step to execute begin transaction and it never returns.

[sqlite] Question about having 2 db connections on same thread

2011-02-13 Thread jeff archer
, when I do first call to step to execute begin transaction and it never returns.  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

[sqlite] sqlite3 command line utility

2011-01-27 Thread Jeff Archer
and I have tried it with appending the digits 1 to 6 and making 6 calls to bind with same result. My app is 64 bit and SQLite Expert is 32 bit. Any thought or suggestion will be appreciated as I am not sure how to proceed.  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com

Re: [sqlite] sqlite3 command line utility

2011-01-27 Thread jeff archer
, '10X' , 'CFI LU Plan Fluor BD 10X' ,  10.0, 0.30, 15.0); Thank you.  This is very convenient.  And seems so obvious now that I have seen it.  Not sure why I didn't figure this out on my own.  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615

Re: [sqlite] SQLite server

2010-12-22 Thread Jeff Archer
Just my two cents... A SQLite Server would be userful.  I have considered creating this myself.  I have thought that it would need to be kept zero config and it should be provided in amalgamation form to keep simple to embed in applications.  Wouldn't need incredible throughput as it is a 

Re: [sqlite] SQLite server

2010-12-22 Thread jeff archer
From: Simon Slavin slav...@bigfraud.org Date: Tue, 21 Dec 2010 14:19:25 + This was my first thought when I considered implementing an SQLite-over-IP protocol: that there was no user model and therefore no need for passwords.  Mounting a database on the server would mean that anyone who knew

Re: [sqlite] Troubleshooting...

2010-12-19 Thread jeff archer
My only guess is that basic_string::c_str() doesn't really provide a pointer to a null-terminated c-style string, but a facsimile of one that SQLite doesn't like. c_str() provides pointer to the data that string has with additional null byte added at the end. That's it. Whether it is a

Re: [sqlite] Just compiled SQLite in Visual Studio

2010-12-01 Thread Jeff Archer
From: john darnell john.darn...@walsworth.com Date: Mon, 29 Nov 2010 17:10:04 -0600 I just added it to a Visual Studio 8 project, turned off the use of precompiled headers (the project is a C++ project) and compiled the SQLite.c file without any errors.  Is it really that easy, or am I about

Re: [sqlite] How to make this calculation in VIEW

2010-11-19 Thread Jeff Archer
Thank you, Simon and Owen. I have tried and both solutions work equally well.  I have actually used C code to make the calculation as I pull out the data. But to help further my understanding of SQL/SQLite, can anyone comment on potential performance differences of the 2 SQL solutions. CREATE

[sqlite] How to make this calculation in VIEW

2010-11-18 Thread Jeff Archer
and nTilesY so I think I do not know how to correctly reference these. Thank you. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] Help with query

2010-11-15 Thread Jeff Archer
Offset_Y) AS Height, Patterns.Description FROM Tiles INNER JOIN Patterns ON Tiles.PatternID = Patterns.PatternID  GROUP BY Tiles.PatternID; Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list

[sqlite] Help with query

2010-11-14 Thread Jeff Archer
of unique Y offsets in a pattern like so: SELECT COUNT(Offset_Y) FROM (SELECT DISTINCT Offset_Y FROM Tiles WHERE PatternID = 1); Is it possible to have a single query that will generate a row for each PattenID, COUNT(Offset_Y) combination? i.e. 1 | 29 2 | 37 3 | 45 Thanks, Jeff Archer Nanotronics

Re: [sqlite] Question about SQLite features.

2010-11-13 Thread Jeff Archer
it does is allow the business rules to be packaged as a complete unit with the data and I claim that would be better design and more maintainable over the life of the project.  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615

Re: [sqlite] Question about SQLite features.

2010-11-12 Thread jeff archer
.  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread jeff archer
and I am very committed to its use in my projects.  Many thanks to all who make SQLite possible.  It is an excellent product.  And the support available through this mailing list is truly top notch.  I have paid (sometimes dearly) for a lot less competent and complete support. Jeff Archer

[sqlite] A question about transactions

2010-11-03 Thread jeff archer
I am using SQLite from C++ and I have implemented a class to manager nested transactions using savepoints.  I have currently implemented as a stack of transactions such that the first Begin uses BEGIN IMMEDIATE, while subsequent levels use SAVEPOINT T where is a sequentially increasing

[sqlite] Query help

2010-10-19 Thread jeff archer
15, 30  Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com 330819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] General questions from a newbe

2010-08-04 Thread jeff archer
I'm new to SQLite but have some experience with MS SQL Server.  I am looking for a quick confirmation from expert that my planed use of SQLite is reasonable and maybe point out if there are any gotchas.  I've done some prototyping and tried most of this out but it is based on how I've done