Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Richard Hipp
On 5/26/17, Clemens Ladisch wrote: > > SQLite does not use FILE_FLAG_RANDOM_ACCESS (except on Windows CE), but > it's possible that Windows is estimating that the accesses are random > (because the actually are). > IIRC, we experimented with using FILE_FLAG_RANDOM_ACCESS but

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Jamie
Thank you for your suggestion Clemens. I had responded about the pragma mmap_size to Mr. Mistachkin, but it ended up in the wrong place, probably because of a mistake I made. Here is the contents of that message below and sorry about the inconvenience: I tried changing it to several different

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Jamie
> > says that there is a different kind of file cache for a random-access > file, and that it shows up as active mapped pages. >

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Richard Hipp
On 5/26/17, Wout Mertens wrote: > > Are the above assumptions correct? Any other calls (besides opening the db) > that can take a long time? Most of the work associated with opening the database connection (which is to say, parsing the schema) is deferred until the first

Re: [sqlite] Two minor issues reported by with MSVC 2017

2017-05-26 Thread Dan Kennedy
On 05/26/2017 10:13 PM, Olivier Mascia wrote: This is on amalgamation code for version 3.19.2. Compiling for 64 bits. Those were not reported with 3.18 as far as I remember. Thanks for reporting these. Looks like Joe already fixed them yesterday:

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Jens Alfke
> On May 25, 2017, at 10:00 PM, Wout Mertens wrote: > > I would like to make it partially asynchronous, still doing most of the > work on the main thread, but waiting in a helper thread. I was thinking > that the longest delays will be from disk access, so sqlite_step().

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Keith Medcalf
On Friday, 26 May, 2017 08:27, Jamie said: >> >> says that there is a different kind of file cache for a random-access >> file, and that it shows up as active mapped pages. >>

[sqlite] Two minor issues reported by with MSVC 2017

2017-05-26 Thread Olivier Mascia
This is on amalgamation code for version 3.19.2. Compiling for 64 bits. Those were not reported with 3.18 as far as I remember. (1) sqlite3.c(189575): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data Line: iHash = fts5HashKey(nNew, (u8*)fts5EntryKey(p),

Re: [sqlite] NOT NULL integer primary key

2017-05-26 Thread Eric
On Thu, 25 May 2017 21:47:20 -0400, "James K. Lowden" wrote: > On Fri, 19 May 2017 12:47:32 -0600 > "Keith Medcalf" wrote: >>On Thursday, 18 May, 2017 10:17, Paul Sanderson >> wrote: >>> Create table test (id integer

Re: [sqlite] problem with special letters

2017-05-26 Thread Simon Slavin
On 26 May 2017, at 10:18pm, hfiandor wrote: > I think: Lazarus work well when the data is introduced by keyboard, but > something fail when read a .csv (Biología) and translate to the SQLite´table > "Biolog¿a" with the insert into... command. Dear Hector, Which

[sqlite] problem with special letters

2017-05-26 Thread hfiandor
Dear collegues: i have an application with two ways to introduce data in the associate table: by keyboard o thru a bottom named "Insert". My language is Spanish, and some letters can have a special sign: a and á, for example. If i introduce a word as Biología by the keyboard, no problem.

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Jamie
> Have you tried the same queries on the SQLite3 client to see if you get the > same blow up of memory? Thank you for the suggestion and your other questions are answered further down. I didn't think to try this, since I didn't know how to handle BLOBs in the client, but looks like I can use a

Re: [sqlite] NOT NULL integer primary key

2017-05-26 Thread James K. Lowden
On Fri, 26 May 2017 18:04:14 +0200 (CEST) Eric wrote: > Why should the INSERT return an error? It is quite OK to, when > inserting a row, not specify a value for a NOT NULL column - as long > as the DDL has specified some way of constructing a value. The SQL in question is >>>

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Jamie
> https://support.microsoft.com/en-us/help/2549369/performance-degrades-when-accessing-large-files-with-file-flag-random-access > > Although the optimization is good, it sounds like it is the typical Microsoft > designed-by-flock-of-idiots software.  There is absolutely no way that this >

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Keith Medcalf
Do you have the LargeSystemCache set to 0 or to 1? HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management If the machine is *not* running anything and is "just a file server" the you want LargeSystemCache=1 and DisablePagingExecutive=1 If it runs any applications at all (that

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Jamie
> So, you have not yet said what the *real* issue is. My original message described the issue very plainly (https://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg103701.html):>> When I'm performing a large amount of selects of GLOBs/thumbnails from an ongoing

Re: [sqlite] problem with special letters

2017-05-26 Thread Joseph L. Casale
-Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of hfiandor Sent: Friday, May 26, 2017 3:18 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] problem with special letters > I think: Lazarus work well when the data is

Re: [sqlite] problem with special letters

2017-05-26 Thread hfiandor
Dear Mr. Simon: Thanks for your rapid answer. I just am using your suggestion of insert into and it work fine. I will try to read the files you suggest. (and study) Thanks again hfiandor ___ sqlite-users mailing list

Re: [sqlite] problem with special letters

2017-05-26 Thread jose isaias cabrera
Make sure your CSV file is save as UTF-8 with encoding. If it is, then the import piece of Lazarus does not pick up UTF8 characters correctly. If any text file has an encoding or Byte Order Mark (BOM) at the beginning of the file, a good program should be able to interpret the correct

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Stephen Chrzanowski
Out of curiosity, how big is the data and GLOBs, and how long does the connection persist, and where are you putting the information once read? From previous recent posts (Not necessarily from this thread) its been mentioned that SQLite reads one row at a time, then discards the data on the next

Re: [sqlite] problem with special letters

2017-05-26 Thread Stephen Chrzanowski
Joseph; FYI, Lazarus is a programming IDE for the Pascal language. It comes built with Free Pascal. Laz comes with built in SQLite3 support, but I've never played with that part of its functionality as I use other wrappers from Delphi. On Fri, May 26, 2017 at 5:33 PM, Joseph L. Casale

Re: [sqlite] Memory Issue - GLOBs and Windows Active Mapped File

2017-05-26 Thread Clemens Ladisch
Jamie wrote: > this is not the normal Windows File Caching that you would typically > see. File Caching would be under STANDBY Mapped File To rule out SQLite's mmap, execute "PRAGMA mmap_size = 0", and then confirm with the output of "PRAGMA mmap_size".

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Wout Mertens
On Fri, May 26, 2017 at 7:33 AM Simon Slavin wrote: > > On 26 May 2017, at 6:00am, Wout Mertens wrote: > > > Ideally there'd be some way to know if a _step() call will be served from > > buffer… > > There are (simplified) three possibilities: quick

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread R Smith
On 2017/05/26 7:33 AM, Simon Slavin wrote: On 26 May 2017, at 6:00am, Wout Mertens wrote: Ideally there'd be some way to know if a _step() call will be served from buffer… There are (simplified) three possibilities: quick quick, slow slow, and slow quick. A) SQLite