Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-13 Thread Rowan Worth
Thanks Richard, that's much clearer. Just one thing: "The page_size pragma will only set in the page size if ..." The "in" looks out of place :) -Rowan On 12 September 2016 at 19:43, Richard Hipp wrote: > On 9/12/16, Rowan Worth wrote: > > The docs for

Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Richard Hipp
On 9/12/16, Rowan Worth wrote: > The docs for PRAGMA page_size say that it is effective if issued "prior to > the first CREATE statement". Fixed at https://www.sqlite.org/draft/pragma.html#pragma_page_size This will be pushed to the main website at the next release. -- D.

Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Hick Gunter
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Rowan Worth Gesendet: Montag, 12. September 2016 12:14 An: General Discussion of SQLite Database <sqlite-users@mailinglists.sqlite.org> Betreff: [sqlite] page_size: bug with PRAGMA or documentation? Hey guys, Th

[sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Rowan Worth
Hey guys, The docs for PRAGMA page_size say that it is effective if issued "prior to the first CREATE statement". So imagine my surprise when I found page_size to be ineffective without ever issuing a CREATE statement! The sequence goes like so: $ rm /tmp/lol.db; sqlite3 /tmp/lol.db SQLite

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-17 Thread Clemens Ladisch
Ward WIllats wrote: > sqlite> attach database '/tmp/RareData.db' as rd; < ATTACH SECOND DB > sqlite> pragma page_size=512; <- SET MAIN DB PAGE SIZE > ... > sqlite> pragma journal_mode=WAL; This sets the journal mode of _both_ databases to WAL. This requires that both database

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Scott Robison
On Tue, Aug 16, 2016 at 12:24 PM, Ward WIllats wrote: > Good thought. But no. In fact, I should have included the line where I > deleted it before taking the trace below. > > ~# rm /tmp/RareData.db > ~# /usr/local/bin/sqlite3 /opt/foundation/core_db.db > SQLite version

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Ward WIllats
Good thought. But no. In fact, I should have included the line where I deleted it before taking the trace below. ~# rm /tmp/RareData.db ~# /usr/local/bin/sqlite3 /opt/foundation/core_db.db SQLite version 3.10.1 2016-01-13 21:41:56 > On Aug 16, 2016, at 11:17 AM, Scott Hess

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Scott Hess
Is there any possibility that the attached db already existed before you ran this? Because once a db exists (contains pages) the page size is fixed until you run vacuum. On Tue, Aug 16, 2016 at 10:53 AM, Ward WIllats wrote: > >>> On Aug 12, 2016, at 11:44 PM, Dan

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-16 Thread Ward WIllats
>> On Aug 12, 2016, at 11:44 PM, Dan Kennedy wrote: >> >> On 08/13/2016 01:14 AM, Ward WIllats wrote: >> >> Can't reproduce this problem here. Are you able to reproduce it with the >> shell tool? >> > > > Yes, if I use the shell on our embedded system

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-13 Thread Ward WIllats
> On Aug 12, 2016, at 11:44 PM, Dan Kennedy wrote: > > On 08/13/2016 01:14 AM, Ward WIllats wrote: > > Can't reproduce this problem here. Are you able to reproduce it with the > shell tool? > Yes, if I use the shell on our embedded system (OpenWRT/Linux). I should

Re: [sqlite] page_size on ATTACH-ed databases

2016-08-13 Thread Dan Kennedy
On 08/13/2016 01:14 AM, Ward WIllats wrote: Consider: 1. Create a new database, set the pragma page_size=512 2. Create a new database on the connection with ATTACH DATABASE '/tmp/number_two.db' AS second; 3. Issue pragma second.page_size=4096 to try and set the page size on the attached DB

[sqlite] page_size on ATTACH-ed databases

2016-08-12 Thread Ward WIllats
Consider: 1. Create a new database, set the pragma page_size=512 2. Create a new database on the connection with ATTACH DATABASE '/tmp/number_two.db' AS second; 3. Issue pragma second.page_size=4096 to try and set the page size on the attached DB to 4096. 4. Read back with pragma

[sqlite] Page_size

2016-02-29 Thread Olivier Mascia
> Le 29 f?vr. 2016 ? 12:34, Simon Slavin a ?crit : > > On 29 Feb 2016, at 9:14am, Olivier Mascia wrote: > >> we have found the sweet spot (for us, and for now) to be 4K page sizes, >> which just happen to be the virtual memory page size of Windows system > > Yes. That's the idea. Match

[sqlite] Page_size

2016-02-29 Thread Jim Wang
hi,all Could different page_size do impact on the speed of retrieving record? Is page_size 8192 faster than page_size 1024 or page_szie 4096? or The pagesize has nothing to do with the retrieving speed. Best reagard! Jim Wang.

[sqlite] Page_size

2016-02-29 Thread Simon Slavin
On 29 Feb 2016, at 9:14am, Olivier Mascia wrote: > we have found the sweet spot (for us, and for now) to be 4K page sizes, which > just happen to be the virtual memory page size of Windows system Yes. That's the idea. Match the page size of the database to the size of the chunks your

[sqlite] Page_size

2016-02-29 Thread Olivier Mascia
> Le 29 f?vr. 2016 ? 09:22, Jim Wang <2004wqg2008 at 163.com> a ?crit : > > hi,all > > Could different page_size do impact on the speed of retrieving record? > Is page_size 8192 faster than page_size 1024 or page_szie 4096? or The > pagesize has nothing to do with the retrieving

[sqlite] Page_size

2016-02-29 Thread Keith Medcalf
. > -Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of Olivier Mascia > Sent: Monday, 29 February, 2016 02:15 > To: SQLite mailing list > Subject: Re: [sqlite] Page_size > &g

[sqlite] Page_size

2016-02-29 Thread Scott Hess
rs- > > bounces at mailinglists.sqlite.org] On Behalf Of Olivier Mascia > > Sent: Monday, 29 February, 2016 02:15 > > To: SQLite mailing list > > Subject: Re: [sqlite] Page_size > > > > > > > Le 29 f?vr. 2016 ? 09:22, Jim Wang <2004wqg2008 at 163.com>

Re: [sqlite] Page_size increase from 1k to 4k made my "REPLACE INTO" slower. why?

2015-01-19 Thread Hick Gunter
nd no other indices; and a transfer thread that copies the entries over into the "real" table in a batch transaction. -Ursprüngliche Nachricht- Von: Andy (KU7T) [mailto:k...@ku7t.org] Gesendet: Montag, 19. Jänner 2015 09:06 An: sqlite-users@sqlite.org Betreff: [sqlite] Page_size

[sqlite] Page_size increase from 1k to 4k made my "REPLACE INTO" slower. why?

2015-01-19 Thread Andy (KU7T)
Hi, I am using System.Data.SQLite, Version=1.0.92.0. I read that increasing the page_size to 4k on modern OS is a good thing and should speed things up. However, I have a particular query that takes substantially longer. I tried to make sure that nothing else is changed, so I am a little

Re: [sqlite] page_size

2010-04-25 Thread Tom Broadbent
ah - good to know. that is what i was looking for. thanks tom On Apr 25, 2010, at 10:21 PM, Dan Kennedy wrote: > The page formats use 16-bit unsigned integers to store various offsets > (in bytes) to cells and free-blocks within a page. So it definitely > won't work with greater than 64KB

Re: [sqlite] page_size

2010-04-25 Thread Dan Kennedy
On Apr 26, 2010, at 11:09 AM, Tom Broadbent wrote: > > thanks for the replies. > > understood. i was informed that our underlying (EMMC??) FS will do > this w/ FS pages, i.e. read the entire 256k FS page, modify some > small portion of it, and write it out again. i'm higher in the >

Re: [sqlite] page_size

2010-04-25 Thread Tom Broadbent
thanks for the replies. understood. i was informed that our underlying (EMMC??) FS will do this w/ FS pages, i.e. read the entire 256k FS page, modify some small portion of it, and write it out again. i'm higher in the stack so i don't understand the underlying FS mechanisms; i've simply

Re: [sqlite] page_size

2010-04-21 Thread D. Richard Hipp
On Apr 21, 2010, at 4:37 PM, Pavel Ivanov wrote: > I don't know anything about internal support of pages bigger than 32k. > But I want to warn you: each table and each index in SQLite occupy at > least 1 database page. So let's say you have 4 tables with 1 > additional index each (besides

Re: [sqlite] page_size

2010-04-21 Thread Pavel Ivanov
I don't know anything about internal support of pages bigger than 32k. But I want to warn you: each table and each index in SQLite occupy at least 1 database page. So let's say you have 4 tables with 1 additional index each (besides 'integer primary key' one). With 256k pages this schema will

[sqlite] page_size

2010-04-20 Thread Tom Broadbent
i've read in the docs that SQLITE_MAX_PAGE_SIZE can't be > 32k (below). is this limitation still valid? we have an embedded FS that is _very_ slow and performs best w/ a write page size of 256k. will bad things happen if i configure SQLite w/ 256k pages? thanks tom Maximum Database Page

Re: [sqlite] Page_size

2007-11-16 Thread Martin Pelletier
[EMAIL PROTECTED] wrote: Martin Pelletier <[EMAIL PROTECTED]> wrote: Hello, I am trying to optimise an SQLite database running on Windows. One of the things I'm looking at is page size. However, a page on sqlite.org (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows)

Re: [sqlite] Page_size

2007-11-16 Thread drh
Martin Pelletier <[EMAIL PROTECTED]> wrote: > > On a side note, that comment on the page > (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows) should > really be clarified to reflect what you just told me. It is clearly told > that the page_size cannot be changed, but the bit about

Re: [sqlite] Page_size

2007-11-16 Thread drh
Martin Pelletier <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to optimise an SQLite database running on Windows. One of > the things I'm looking at is page size. However, a page on sqlite.org > (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows) mentions > this: > > "Just a

[sqlite] Page_size

2007-11-16 Thread Martin Pelletier
Hello, I am trying to optimise an SQLite database running on Windows. One of the things I'm looking at is page size. However, a page on sqlite.org (http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows) mentions this: "Just a note that you must also perform this command [PRAGMA