Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-02 Thread Shane Harrelson
What is your page size? Make sure it matches the sector size of your device. SSDs can be picky about write sizes. As an experiment, you might try using larger page sizes that are multiples of the sector size. Try to reduce the size of the records you are writing. Ie. can you map any string

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-02 Thread Shane Harrelson
I had a few suggestions and questions earlier in this thread that I don't think have been responded to. And yes, without seeing the source it will be difficult to make more suggestions. On Apr 2, 2014 4:57 PM, "Kevin Xu" wrote: > The app seems to use between 60-80% CPU while

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Shane Harrelson
Neither of these are your problem, but I noticed the following in your posted code: PRAGMA auto_vacuum=NONE; has no affect after your tables are created. You should move this setting earlier in your code. http://www.sqlite.org/pragma.html#pragma_auto_vacuum PRAGMA count_changes=OFF is

Re: [sqlite] Index on expressions

2014-09-03 Thread Shane Harrelson
Use a trigger to populate your index column. http://www.sqlite.org/lang_createtrigger.html On Wed, Sep 3, 2014 at 9:01 AM, Dominique Devienne wrote: > On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp wrote: > > > SQLite does not (yet) support indexes on

Re: [sqlite] BUG: mutex_w32.c; diagnostic message needs to be clearer

2011-03-14 Thread Shane Harrelson
I updated the debug statement here: http://www.sqlite.org/src/info/def98fd23e Thanks for the report. -Shane On Mon, Mar 14, 2011 at 7:54 PM, Noah Hart wrote: > > In the routine winMutexTry at line 284 > > -    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace,

Re: [sqlite] Building managed only System.Data.SQLite

2011-04-19 Thread Shane Harrelson
The target build settings can be controlled from SQLite.NET.Settings.targets - in particular, you should probably look at UseInteropDll and UseSqliteStandard. To override the USE_INTEROP_DLL setting, try copying SQLite.NET.Settings.targets to SQLite.NET.Settings.targets.user and make the settings

Re: [sqlite] Building managed only System.Data.SQLite

2011-04-20 Thread Shane Harrelson
teresting but I do not know > > if that is right for me at this moment. > > > > Shane: > > > > I will try what you recommend tomorrow, thank you. > > > > -- > > Rich > > > > On Tue, Apr 19, 2011 at 4:47 PM, Shane Harrelson > > <

Re: [sqlite] System.Data.SQLite Status

2011-05-13 Thread Shane Harrelson
On Fri, May 13, 2011 at 3:24 AM, Clay Fowler wrote: > The downloads at > http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wikiappear > broken in various ways: > > The precompiled binaries fail to work on desktop from Mono on OS X or on > Microsoft's CLR

Re: [sqlite] Unable to load dll "SQLite.Interop.dll"

2011-05-20 Thread Shane Harrelson
The setup packages available from here: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki are suppose to check if the MSVC runtimes are installed or not and install them. It's the main reason the packages are as large as they are. How did you install the SDS DLLs? Thanks.

Re: [sqlite] Interop DLL question

2011-05-20 Thread Shane Harrelson
Switching to a "single format" greatly simplified things from an "administrative" point of view - giving us a consistent single "packaging" format across all platforms (Windows, Mono, Compact, ARM, etc.) - a support customer even specifically pointed out this made things much easier for them as

Re: [sqlite] .NET4 is available?

2011-05-27 Thread Shane Harrelson
The latest versions are available at http://system.data.sqlite.org On Thu, May 26, 2011 at 11:54 AM, Massimo Savazzi wrote: > I'm using the "old": 1.0.66.1 .NET4 > > http://sqlite.phxsoftware.com/tags/.NET+4/default.aspx > > > > Do we have an updated version? > > >

Re: [sqlite] Discussing and contributing to new System.Data.SQLite project

2011-05-27 Thread Shane Harrelson
Hi- The SDS project is currently being maintained by the same people who maintain SQLite. We're currently also using the same mailing list (this one, sqlite-users) for discussions of SDS. Contributions are always welcome, but please note we will need a "contributor agreement" on file:

Re: [sqlite] Support for .Net CE 3.5

2011-06-02 Thread Shane Harrelson
You'll have to go back to one of the "legacy versions" from http://sqlite.phxsoftware.com . Compact framework support was one of the features that had to be temporarily dropped when maintenance was moved to http://www.sqlite.org . Restoring compact framework is currently one of our top priorities.

Re: [sqlite] SQLite3.dll for Win 64

2011-07-25 Thread Shane Harrelson
The TK_* identifiers are all defined in parse.h which is generated by lemon.exe from parse.y. parse.h is "included" in the amalgamation file, sqlite3.c. Try deleting your parse.c and parse.h and sqlite3.c and re-running your make. Check that parse.h was generated correctly and subsequently

Re: [sqlite] SQLite3.dll for Win 64

2011-07-25 Thread Shane Harrelson
The makefile builds lemon.exe from lemon.c as part of the build process, so make sure it was generated correctly as well. "lemon -x" should print a version number. "lemon -?" should print an error and help message. Again, HTH. -Shane On Mon, Jul 25, 2011 at 5:51

[sqlite] custom collation functions not called for integer columns

2007-06-07 Thread Shane Harrelson
It appears that I can *NOT* create a custom collation function for a column declared as an INTEGER. Well, I can create it, and prepare a statement to use it, but my custom function is *NEVER* called. Is this by design? The exact same code works for a TEXT column. Should the

Re: [sqlite] index with NULL values

2007-06-13 Thread Shane Harrelson
Good stuff! Is this in the wiki somewhere? On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Adler, Eliedaat" <[EMAIL PROTECTED]> wrote: > Hi, > > I want to add an index on a sparsely populated column - > i.e. for most rows the column is null. > > 1. Would this index be very compact?

[sqlite] How to use pragmas from code?

2007-06-19 Thread Shane Harrelson
To use pragmas from code, do I simply prepare them as a regular SQL statement and then execute them? And when can they/should they be done? As the first statement after an open? Are the pragma values stored with the database? Or do they have to be issued after each open? Thanks. -Shane

[sqlite] Custom GLOBing function

2007-08-02 Thread Shane Harrelson
I have a query of the following form using SQLite's built in GLOB function: SELECT * FROM foo WHERE bar GLOB '*' I implemented a custom glob(x,y) function to replace the built-in GLOB, registering it with: sqlite3_create_function(db, "glob", 2, SQLITE_ANY, NULL, my_glob, NULL, NULL); This all

[sqlite] random(*), randomblob(N), etc.

2007-08-15 Thread Shane Harrelson
I have a table that has the rows sorted by using a column which is filled with values from random(*). Is there a PRAGMA or other API which allows me to set the "seed" used by random(*) such that I can reproduce the same random sequence each time? Thanks. -Shane

Re: [sqlite] random(*), randomblob(N), etc.

2007-08-15 Thread Shane Harrelson
On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Shane Harrelson" <[EMAIL PROTECTED]> wrote: > > I have a table that has the rows sorted by using a column which is > filled > > with values from random(*). > > > > Is there

Re: [sqlite] random(*), randomblob(N), etc.

2007-08-15 Thread Shane Harrelson
Now thats a good idea! Thanks! On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Shane Harrelson" <[EMAIL PROTECTED]> wrote: > > > > Other than the normal caveats for using customized versions of the > SQLite > > code, does this sou

[sqlite] no mention of SQLite :(

2008-01-04 Thread Shane Harrelson
Embedded Database Vendors Face Challenges: http://www.eweek.com/article2/0,1895,2243406,00.asp How could an article like this not mention SQLite?

[sqlite] journal size

2007-01-30 Thread Shane Harrelson
what's the most reliable method for checking the size of the jounal file for a database? is there anyway to flush that or sync it during testing? i tried using stat() on the jounral file but under windows it sometimes reports the jounral file having size 0 even though I know it's not empty.

Re: [sqlite] journal size

2007-01-30 Thread Shane Harrelson
On 1/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Shane Harrelson" <[EMAIL PROTECTED]> wrote: > what's the most reliable method for checking the size of the jounal > file for a database? is there anyway to flush that or sync it during > testing? i tried u

[sqlite] UNIQUE constraint on column

2007-01-30 Thread Shane Harrelson
when i try to insert a row into a table that has a UNIQUE constraint on a column, and I get the SQLITE_CONSTRAINT result code because i'm inserting a duplicate value, is there anyway to determine the rowid of the conflict? looking at the internals of the VDBE, i found that the rowid of the

[sqlite] UNIQUE constraint on column

2007-01-31 Thread Shane Harrelson
when i try to insert a row into a table that has a UNIQUE constraint on a column, and I get the SQLITE_CONSTRAINT result code because i'm inserting a duplicate value, is there anyway to determine the rowid of the conflict? looking at the internals of the VDBE, i found that the rowid of the

Re: [sqlite] UNIQUE constraint on column

2007-01-31 Thread Shane Harrelson
On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Shane Harrelson" <[EMAIL PROTECTED]> wrote: > when i try to insert a row into a table that has a UNIQUE constraint > on a column, and I get the SQLITE_CONSTRAINT result code because i'm > inserting a d

Re: [sqlite] UNIQUE constraint on column

2007-01-31 Thread Shane Harrelson
On 1/31/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Shane Harrelson wrote: > On 1/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> The official way to find the conflicting entry is to do a query. >> >> SELECT rowid FROM table WHERE uniquecolumn=?

Re: [sqlite] UNIQUE constraint on column

2007-02-01 Thread Shane Harrelson
"Shane Harrelson" <[EMAIL PROTECTED]> wrote: > > I have two tables, an "Objects" table with a foreign key into a second > "Strings" table which is composed of unique values. It is a many to > one relationship, that is, several Objects may refere

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-02 Thread Shane Harrelson
On 2/2/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote: * Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]: > Sounds like you should want to use INSERT OR IGNORE ... INTO > Strings and then SELECT the rowid of the string for use in > INSERTing INTO Object. That was my first thought as well.

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-02 Thread Shane Harrelson
On 2/2/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Shane Harrelson wrote: > On 2/2/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote: >> * Nicolas Williams <[EMAIL PROTECTED]> [2007-02-01 00:10]: >> > Sounds like you should want to use INSERT OR IGNORE ... INTO &g

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-05 Thread Shane Harrelson
On 2/5/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote: * [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2007-02-04 13:35]: > "A. Pagaltzis" <[EMAIL PROTECTED]> wrote: > > It's a pity that INSERT OR IGNORE (apparently?) does not set > > last_insert_id properly regardless of outcome, > > Consider this case: >

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-05 Thread Shane Harrelson
On 2/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Shane Harrelson wrote: > Perform 50 transactions of 1000 inserts each (5 total). > Shane, Is this your normal usage pattern? Inserting records in blocks of around 1000 per transaction. Or would you be more likely to inser

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-05 Thread Shane Harrelson
On 2/5/07, Joe Wilson <[EMAIL PROTECTED]> wrote: --- Shane Harrelson <[EMAIL PROTECTED]> wrote: > On 2/5/07, Dennis Cote <[EMAIL PROTECTED]> wrote: > > Shane Harrelson wrote: > > > Perform 50 transactions of 1000 inserts each (5 total). > > &g

Re: [sqlite] Re: UNIQUE constraint on column

2007-02-06 Thread Shane Harrelson
On 2/6/07, Joe Wilson <[EMAIL PROTECTED]> wrote: --- Shane Harrelson <[EMAIL PROTECTED]> wrote: > On 2/5/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > > Yes, it's typical. Each database instance is typically composed of > > > around 50k records, all in

Re: [sqlite] Regression with sqlite-snapshot-201007091257

2010-07-13 Thread Shane Harrelson
I tried to reproduce the issue with the latest version, as well as with the referenced snapshot, and could not. I ran two instances of the sqlite CLI as you indicated without issue. C:\work\sqlite\win32\Debug>sqlite_snapshot test.db SQLite version 3.7.0 Enter ".help" for instructions Enter SQL

Re: [sqlite] poor insert performance with 3.7/Windows

2010-07-26 Thread Shane Harrelson
I've not seen the performance degradation you've reported here in my testing. If you could provide any more details that would help in reproducing this, it would be appreciated. And yes, you can safely modify the SQLITE_FCNTL_SIZE_HINT in os_win.c to be a "no-op" in the same way as os_unix.c.

Re: [sqlite] SQLite fails to build for WinCE 4.2 (WM 2003)

2010-08-24 Thread Shane Harrelson
On Windows CE, you need to compile with SQLITE_OMIT_WAL. SQLite currently doesn't support the WAL journaling mode on CE. On Tue, Aug 24, 2010 at 6:32 AM, Aleksandr Jr. wrote: > Hi. > > I got a problem when compiling SQLte 3.7.2 for Windows CE 4.2 (Windows > Mobile

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-09 Thread Shane Harrelson
Michele- I've looked at trying to reproduce your issue on an 32-bit Windows XP system using the latest code, and could not. Even assuming the "worst case" of a 512 byte page size, starting with a 1.2gb DB file, deleting all the records would result in a WAL file of roughly the same size

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Shane Harrelson
I tried to reproduce this, and could not. There are some questions inline below.Additionally, I want to verify that you've tried this with a version of SQLite containing the previously linked fix. -Shane On Fri, Sep 10, 2010 at 12:54 AM, Max Vlasov wrote: >> But as a

Re: [sqlite] Breakpoints uncorrelated on MSVC amalgamation build

2010-09-23 Thread Shane Harrelson
This limitation has been around for a while in the MS Visual debuggers... I can't find the MSDN article that discusses it, but once you exceed 64k lines, all bets are off. Work arounds include using the canonical source to build and debug, or stripping comment lines, white space etc. from the

Re: [sqlite] Compiling dll 3.7.3 issue was [BUG] JOIN subquery in FROM with FTS3 table

2010-10-08 Thread Shane Harrelson
You'll get this if your .DEF file includes any APIs that are not compiled into your build. A few sources are: SQLITE_OMIT_LOAD_EXTENSION=1 SQLITE_ENABLE_COLUMN_METADATA=1 SQLITE_ENABLE_STAT2=1 SQLITE_ENABLE_FTS3=1 SQLITE_ENABLE_RTREE=1 Depending on how you're compiling, you have a couple of

Re: [sqlite] Porting SQLite 3.7.2 to vxWorks 6.7

2010-10-11 Thread Shane Harrelson
See: http://www.sqlite.org/src/info/d1ed743b6e for changes for SQLITE_OMIT_WAL. 3.7.3 should be available from the downloads page: http://www.sqlite.org/download.html as of October 8, 2010. You might need to refresh your browser cache. Direct link to the amalgamation is:

Re: [sqlite] SQLite3.7.3_for_Pocket_PC_2003_can't_compile

2010-10-22 Thread Shane Harrelson
You need to compile with SQLITE_OMIT_WAL for now. On Thu, Oct 21, 2010 at 10:09 PM, 祝久文 wrote: > Hello, > When compiling for Pocket PC 2003(VS2005),it gives out two errors as follows: > .\os_win.c(1350) : error C2065: 'LOCKFILE_EXCLUSIVE_LOCK' : undeclared > identifier >

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Shane Harrelson
In Visual C, a "long double" and a "double" are the same, and only offer 53 bits of precision. On GCC, a "long double" has 80 bits of precision. Unfortunately, I don't think there's a way to have Visual C use more precision. Because of this, round off error will always differ between the two

Re: [sqlite] SQLite in WinCE Emulator - Disk I/O Error and change of pragma don´t work

2010-12-08 Thread Shane Harrelson
According to the MSDN support sites, there are a couple of known issues with the Windows Mobile Emulator, when using emulated storage cards. With an emulated storage card, SetEndOfFile() (which we use for truncating a file) and FlushFileBuffers() (which we use for syncing) will fail. They do not

Re: [sqlite] WAL locking problem on Windows CE

2010-12-10 Thread Shane Harrelson
On Fri, Dec 10, 2010 at 9:06 AM, Richard Hipp wrote: > On Fri, Dec 10, 2010 at 4:02 AM, Nicklas Larsson > wrote: > >> Hi, >> >> we have been running SQLite (3.6.21) successfully on Windows CE for a >> while. >> When upgrading to version 3.7.3 our intent

Re: [sqlite] Windows performance problems associated with malloc()

2010-12-17 Thread Shane Harrelson
I believe the Windows default is to use the LFH on Vista and newer versions of Windows. The suggestion by Marcus Grimm to use _set_sbh_threshold() to enable use of the SBH (small block heap) may help under some usage scenarios on those platforms. -Shane On Fri, Dec 17, 2010 at 6:29 PM, Doug

Re: [sqlite] Outer query returning results not found in subquery

2011-02-10 Thread Shane Harrelson
On Thu, Feb 10, 2011 at 2:29 PM, Igor Tandetnik wrote: > On 2/10/2011 2:17 PM, Dan Kubb wrote: >> Database setup: >> >>      CREATE TABLE "test" ("letter" VARCHAR(1) PRIMARY KEY, "number" INTEGER >> NOT NULL); >> >>      INSERT INTO "test" ("letter", "number") VALUES('b',

Re: [sqlite] BUG: capi3e.test when compiled with SQLITE_OMIT_UTF16

2011-02-13 Thread Shane Harrelson
Thanks.Hopefully corrected here: http://www.sqlite.org/src/info/b04304b967 -Shane On Fri, Feb 11, 2011 at 4:59 PM, Noah Hart wrote: > > capi3e.test needs >      ifcapable utf16 logic before capi3e-2.1.$i > to properly pass tests when compiled with SQLITE_OMIT_UTF16 > >

Re: [sqlite] BUG: test script exclusive2.test needs do_not_use_codec

2011-02-15 Thread Shane Harrelson
Thanks. I think I got all the changes. On Mon, Feb 14, 2011 at 7:47 PM, Noah Hart wrote: > > exclusive2.test reads directly from the database using binary read > > It needs the following changes: > > -source $testdir/tester.tcl > +source $testdir/tester.tcl > + > +# Do not

Re: [sqlite] UPDATE/INSERTing 1-2k rows slower than expected

2011-02-16 Thread Shane Harrelson
On Mon, Feb 14, 2011 at 6:04 PM, Simon Slavin wrote: > > If the data is backed up when SQLite has the files closed, things are fine.   > The really hard part of this comes when you're working with systems that must > be live at all times.  Which is why you'll never see a

Re: [sqlite] Problem with VACUUM feature

2011-02-23 Thread Shane Harrelson
Hi- On Windows, SQLite uses the FILE_FLAG_DELETE_ON_CLOSE flag to have temporary files automatically deleted after they are closed. WINCE doesn't support this flag, so you will see special logic in os_win.c, wrapped in #ifdef SQLITE_OS_WINCE, for handling the deletion of these files. You

Re: [sqlite] Source code for system.data.sqlite

2011-03-02 Thread Shane Harrelson
Thanks for the feedback. We're currently trying to work out a Contributor License Agreement for System.Data.SQLite - probably something along the lines of http://www.fossil-scm.org/fossil/doc/trunk/www/copyright-release.html used for Fossil. You need to login to the Fossil site, even if only as

[sqlite] limts change with switch from bit maps to vectors?

2008-04-02 Thread Shane Harrelson
Is the limit of 64 tables in a join changed now that it's using "bit vectors" instead of "bit maps"? Similar on number of attached databases? Or were the changes only to the bitmaps used for page tracking? http://www.sqlite.org/limits.html -Shane ___

Re: [sqlite] Testing sqlite

2008-04-30 Thread Shane Harrelson
If you have TCL installed, you can build the 'testfixture' which is used to run the tests. ;# Unpack the source tree into "sqlite" mkdir sqlite cd sqlite tar xzf sqlite.tar.gz ;# Build will occur in a sibling directory cd .. mkdir bld ;# Change to the build directory cd bld ;# Run the

Re: [sqlite] Question about sqlite3_busy_timeout

2008-05-06 Thread Shane Harrelson
This may be fixed by ticket 3030: http://www.sqlite.org/cvstrac/tktview?tn=3030 On 5/6/08, Hans Guijt <[EMAIL PROTECTED]> wrote: > > Hi all, > > > I have a simple question: on my SQLite database I set > sqlite3_busy_timeout() to a generous 1 milliseconds, but sometimes > it doesn't wait _at

Re: [sqlite] Perf improvements in 3.5.9

2008-05-15 Thread Shane Harrelson
The format of the varints in the DB were not changed.For Varint32s, the macro support was cleaned up and changes made to use it consistently. The MACROs inline the single byte case, so code for this was disabled in the actual function. The actual functions were re-implemented to utilize

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
This wiki page (http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions) talks about SQLite's loadable extension functionality. If you can tell me what platform you're compiling for (processor, O/S version, etc.), and what build tools (cygwin/gcc, mingw, MSVC, etc.) you're using, I will try and

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
Without creating a .DEF file for MSVC to use, you need to tell it which functions to "export". The easiest way to do this is with the __declspec(dllexport). You should modify the rtree.c source file and add the following before each public function: __declspec(dllexport) So for instance, line

Re: [sqlite] rtree extension to use with my data

2008-06-04 Thread Shane Harrelson
You can read a very good overview of R-Trees at Wikipedia. http://en.wikipedia.org/wiki/R-tree which includes some coordinate based examples. On 6/4/08, Jay A. Kreibich <[EMAIL PROTECTED]> wrote: > > On Wed, Jun 04, 2008 at 06:18:22PM +0200, Christophe Leske scratched on the > wall: > > > > >

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
Once you get it working with your data, you may want to play around with the defines at the top of rtree.c. > /* Either, both or none of the following may be set to activate > ** r*tree variant algorithms. > */ > #define VARIANT_RSTARTREE_CHOOSESUBTREE 0 > #define VARIANT_RSTARTREE_REINSERT 1 >

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
Dennis- Your last "simplification": > -- a further simplification of the general case that removes > -- redundant terms > select * from City > where id in > ( > select id from CityLoc > where (lat_min < :max_lat and lat_max > :min_lat) > and

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
The default R-Tree code uses the "R*-tree algorithm" for splitting. While this should typically perform better than the other two variants (Guttman Quadratic and Linear splitting), you may want to test them with your data set and queries to see if either performs better. You will need to

Re: [sqlite] What is quicker?

2008-06-04 Thread Shane Harrelson
In addition to playing with the splitting algorithms, since you are compiling your own DLL, you can customize the R-Tree module for 2 dimensions -- i.e. hard-code it for 5 columns of data. This would *roughly* be accomplished by replacing all occurrences of pRtree->nDim with (2) and

[sqlite] R-Tree's and spherical coordinates

2008-06-04 Thread Shane Harrelson
With the recent discussions on R-Tree's and spherical coordinates (i.e. latitude and longitude), I was wondering how boundary conditions would be handled. If I choose a location on the equator as far from the prime meridian as possible, and try to query for all the locations "near" that, within a

Re: [sqlite] rtree extension question

2008-06-09 Thread Shane Harrelson
You can improve performance (space/speed) a little by changing the RTREE_MAX_DIMENSIONS at the top of rtree.c to match you data set. It defaults to 5 dimensions, but you could reduce to this to 2, or 3 with city size. #define RTREE_MAX_DIMENSIONS 5 -Shane On 6/9/08, Dennis Cote <[EMAIL

Re: [sqlite] rtree extension question

2008-06-09 Thread Shane Harrelson
Each pair of columns (min/max) represents one dimension. So for latitude/longitude coordinates you would have 5 columns: 1 id column and 2 columns each for latitude and longitude. 5 "columns" equates to 2 dimensions of data. 7 "columns" equates to 3 dimensions of data. Etc. HTH. -Shane On

Re: [sqlite] How to build an extension that gets autoloaded

2008-06-09 Thread Shane Harrelson
If you just need the rtree extension, I believe it will be included by default in the next version of the core sqlite library. -Shane On Tue, Jun 10, 2008 at 12:39 AM, Stephen Woodbridge < [EMAIL PROTECTED]> wrote: > Hi all, > > I was reading through the sqlite source and noticed that there

Re: [sqlite] rtree extension question

2008-06-11 Thread Shane Harrelson
Were you able to try this Christophe? I expect it to only be a very slight performance improvement, but I'm still curious as to how much. On 6/9/08, Shane Harrelson <[EMAIL PROTECTED]> wrote: > > Each pair of columns (min/max) represents one dimension. So for > latitude/longit

Re: [sqlite] rtree extension question

2008-06-11 Thread Shane Harrelson
On 6/11/08, Christophe Leske <[EMAIL PROTECTED]> wrote: > > Shane Harrelson schrieb: > > Were you able to try this Christophe? I expect it to only be a very > slight > > performance improvement, but I'm still curious as to how much. > > > Shane, > > tha

Re: [sqlite] datetime bug

2008-06-11 Thread Shane Harrelson
Tom- Can you provide some details of your test setup? What version of SQLite? What platform (compiler, O/S, processor, 32bit vs 64bit, etc.)? I updated the date testscripts in CVS to add tests for you cases below, and they worked correctly for version 3.5.9 of SQLite compiled with both GCC and

Re: [sqlite] datetime bug

2008-06-12 Thread Shane Harrelson
I was able to reproduce this by setting by TZ to GMT +10:00. It's a floating point rounding issue in the julian date functions. We're investigating how to best correct it, but I don't have a "fix" for you now. On 6/12/08, BareFeet <[EMAIL PROTECTED]> wrote: > > Hi Shane, > > >> This:

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-07 Thread Shane Harrelson
Make sure SQLite isn't being compiled with -ffast_math on the the Debian side. That might cause problems. On 7/3/08, Tom Epperly <[EMAIL PROTECTED]> wrote: > > When I tried reproducing this behavior on a Red Hat box, the 3.5.9 > version gave the expected results, so I guess it is a Debian

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
You can find the same issue reported for Fedora from a few weeks ago: http://www.sqlite.org/cvstrac/tktview?tn=3186 Here's the original thread from the mailing list discussion: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-dev/2008-June/000172.html -ffast_math was the culprit in this

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
Try make CFLAGS="-g -O2 -fno-fast-math" and see if that fails like your test case 2. I *think* this will turn on the -O2 optimizations and disable fast-math. Other than that, I don't have any other suggestions. HTH. -Shane On 7/8/08, Tom Epperly <[EMAIL PROTECTED]> wrote: >

Re: [sqlite] sqlite3 3.5.9 floating point division seems odd

2008-07-08 Thread Shane Harrelson
I'm not a very knowledgeable on Debian distributions, but http://packages.qa.debian.org/g/gcc-4.3.html indicates that gcc (Debian 4.3.1-4) which you posted that you are using was only made available 2008-07-01, is marked as "unstable", and hasn't even made it to their testing stage yet. Is there

Re: [sqlite] problem compiling loadable extensions using Visual Studio

2008-07-09 Thread Shane Harrelson
Without creating a .DEF file for MSVC to use, you need to tell it which functions to "export". The easiest way to do this is with the __declspec(dllexport). You should modify your source file and add the following before each public function: __declspec(dllexport) So for instance: int

Re: [sqlite] problem building reduced-size sqlite

2008-07-21 Thread Shane Harrelson
I checked in some updates to the "configure" support that will hopefully do the right thing and pass any OMIT options to lemon and mkkeywordhash. There was also a minor fix to handle SQLITE_OMIT_VIEW being defined while SQLITE_OMIT_SUBQUERY is undefined in select.c (something you probably rand

Re: [sqlite] problem building reduced-size sqlite

2008-07-22 Thread Shane Harrelson
On 7/22/08, Steve Friedman <[EMAIL PROTECTED]> wrote: > > > > Actually, I have both --enable-tempstore=always and -DTEMP_STORE=2 > (belts and suspenders). Then you probably want to use -DSQLITE_TEMP_STORE=2 instead. ___ sqlite-users mailing list

Re: [sqlite] problem building reduced-size sqlite

2008-07-24 Thread Shane Harrelson
on the suggested lemon changes (--help support and usage updates) -- perhaps open a ticket and see what DRH says. -Shane On 7/23/08, Dennis Cote <[EMAIL PROTECTED]> wrote: > > Shane Harrelson wrote: > > I checked in some updates to the "configure" support that will hopefully >

Re: [sqlite] Sqlite Endianness

2008-07-25 Thread Shane Harrelson
If you're really serious about storing your data in a "native" form to reduce read/write overhead for handling endian-ness (and I think this is going to be more trouble than it's worth) then you can look at replacing the following functions in vdbeaux.c: ** sqlite3VdbeSerialType() **

Re: [sqlite] winDelete retry-on-failure functionality isn't working

2008-07-30 Thread Shane Harrelson
GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of ERROR_ACCESS_DENIED if the file is in a "pending delete" state. I'll update the retry logic in os_win.c in winDelete() to add this additional check. I believe that should improve the situation (as long as the other application

Re: [sqlite] winDelete retry-on-failure functionality isn't working

2008-07-30 Thread Shane Harrelson
would appreciate any confirmation that it works for you :) On 7/30/08, Jeremy Spiegel <[EMAIL PROTECTED]> wrote: > > Shane, > > Just saw the checkin for the fix. Thanks! > > :) Jeremy > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:

Re: [sqlite] Possible Error in 3.6.0?

2008-08-07 Thread Shane Harrelson
This was previously reported, and couldn't be reproduced. http://www.sqlite.org/cvstrac/tktview?tn=3262 Any help in recreating it would be appreciated. -Shane On 8/6/08, Peter Holmes <[EMAIL PROTECTED]> wrote: > > FWIW, on a Dell Inspiron 530 running Ubuntu 7.10 with Tcl8.4 installed, > >

Re: [sqlite] Generic speed testing

2008-08-15 Thread Shane Harrelson
Windows XP SP2, SQLite 3.6.1, Intel T2400 (1.83GHZ) Dual Core, 2Gb RAM, 5000RPM Drive SQL error near line 112: no such table: TEST1 SQL error near line 127: no such table: TEST1 0|performance.txt,v 1.0|1.0|0|0.0K Rows/Second 1|Trivial Inserts|21.17|10077696|476.0K Rows/Second 2|Trivial

Re: [sqlite] sqlite comparer

2008-08-28 Thread Shane Harrelson
There may be one... if not, you could always use .dump from the CLI on both and then run the text based dumps though a merge utility (like WinMerge) or through a diff utility. This would probably give you a reasonably good starting point. ___

Re: [sqlite] The old bug strikes back

2008-09-22 Thread Shane Harrelson
This was my fault. http://www.sqlite.org/cvstrac/chngview?cn=5654 strcasecmp() isn't available on all platforms, and I naively assumed sqlite3StrICmp() would be (it's not in this case do to the way you are compiling/linking). I'll review the issue and see what I can do. On Mon, Sep 22, 2008

Re: [sqlite] Multiple SQL statements for regression tests?

2008-10-12 Thread Shane Harrelson
In the SQLite CVS repository, look at the test subdirectory. There are a set of TCL based files and scripts which are fed to the SQLite test harness to implement much of the regression tests for SQLite. You can probably grep through the *.test files to get examples of many, many SQL statements

Re: [sqlite] experiencing SQLite crash (Apache/mod_perl/Catalyst)

2008-10-15 Thread Shane Harrelson
Possibly HW (memory, disk, etc.) failures? On Wed, Oct 15, 2008 at 2:54 AM, Dami Laurent (PJ) < [EMAIL PROTECTED]> wrote: > Hi all, > > I have a Perl Catalyst app using SQLite as storage. It has been running > for several months without any problem. > Now in the last few days we had several

Re: [sqlite] Intermittent SQLITE_CANTOPEN on Windows

2008-10-15 Thread Shane Harrelson
Version 3.6.1 (IIRC) had changes to improve the error detection and retry logic for this condition (typically caused when a 3rd party application opens the SQLite journal file.) HTH. -Shane On Mon, Oct 13, 2008 at 12:52 PM, Doug <[EMAIL PROTECTED]> wrote: > I'm using SQLite 3.5.6 on Windows

Re: [sqlite] SQLite version 3.6.4

2008-10-15 Thread Shane Harrelson
Try http://sqlite.org/releaselog/3_6_4.html On Wed, Oct 15, 2008 at 8:17 AM, Alexey Pechnikov <[EMAIL PROTECTED]>wrote: > Hello! > > В сообщении от Wednesday 15 October 2008 16:11:47 D. Richard Hipp > написал(а): > > For a summary of changes and enhancements > > that have occurred in version

Re: [sqlite] Compiling with mingw32/msys, and using options

2008-10-16 Thread Shane Harrelson
You can add it as an option to either configure or make. For a makefile generated from configure, you would do something like: make OPTS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 TCL is needed to build the amalgamation, as TCl scripts are used to generate the "amalgamated" file. ActiveTCL works.

Re: [sqlite] Compiling with mingw32/msys on Windows

2008-10-18 Thread Shane Harrelson
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT is not being passed in make to your object compiles... I'll try to duplicate this here. -Shane On Fri, Oct 17, 2008 at 5:40 PM, John Belli <[EMAIL PROTECTED]> wrote: > OK, I should have all the required utils, and configure apparently > worked properly, but

Re: [sqlite] [sqlite3] Macports Build Failed

2008-10-22 Thread Shane Harrelson
What version are you trying to build? 3.6.4? Where did you get your sources? The SQLite website? Are you building from the amalgamation? or the individual sources? -Shane On Wed, Oct 22, 2008 at 8:07 AM, Brent Austin <[EMAIL PROTECTED]> wrote: > I've been trying to get sqlite3 to build on my

Re: [sqlite] [sqlite3] Macports Build Failed

2008-10-22 Thread Shane Harrelson
(and parse.c, etc.), into a single source file, sqlite3.c. You should be able to check your generate sqlite3.c file for a comment of the form "Begin file parse.h". HTH. -Shane On Wed, Oct 22, 2008 at 8:41 AM, Shane Harrelson <[EMAIL PROTECTED]> wrote: > What version are you tryi

Re: [sqlite] Compiling with mingw32/msys on Windows

2008-10-22 Thread Shane Harrelson
I was able to duplicate the issue, and I've updated the configure scripts to correct the problem. If you are generating your makefile using configure, you can pass it options like this: configure CFLAGS=-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 This will generate a makefile which passes the

Re: [sqlite] SQLite 3.6.4 link problem on WindowsCE

2008-10-23 Thread Shane Harrelson
Thanks for the report. The problem has existed in SQLite since version 3.6.1. This has already been reported in multiple tickets, see tickets #3420 and #3448. This was caused by check-ins [5450] and [5441] which removed dead code and exposed the undefined symbols. This was (hopefully) corrected

Re: [sqlite] Making the binary small

2008-10-29 Thread Shane Harrelson
Are you compiling the SQLite shell utility, or just the library? The Windows and Linux versions of the lib available from the download page which are compiled with all the optional features are 235kb and 205kb respectively. It's surprising that the compiled version for AVR32 is more than twice

  1   2   >