Re: [sqlite] SELECT the "middle" of a large ordered table

2016-05-28 Thread Dominique Devienne
On Fri, May 27, 2016 at 10:02 PM, Clay Gerrard wrote: > [...] These container databases are normally small (<1-4M rows) - and you > can have many of them (>10M) - but depending on the usage pattern - they can > also grow big (100+ GB) when there are many many object rows

Re: [sqlite] SELECT the "middle" of a large ordered table

2016-05-27 Thread Clay Gerrard
NEAT! yeah i'll definitely have to recompile and check that out - the nLt column sounds interesting!? [1] But I'm not sure what the end game would be - any sample of ANALYZE results wouldn't generalize to any other containers of a similar size - so I'd be looking at always running with a sqlite3

Re: [sqlite] SELECT the "middle" of a large ordered table

2016-05-27 Thread Simon Slavin
On 27 May 2016, at 9:02pm, Clay Gerrard wrote: > Is there a more obvious way to find this "middle" of a large ordered query > in an indexed table? Just estimating between the min and max doesn't > always seem to represent a good split since the distribution of prefixes

[sqlite] SELECT the "middle" of a large ordered table

2016-05-27 Thread Clay Gerrard
The OpenStack Object Storage system uses sqlite3 databases as the "metadata" storage layer for it's "containers" and "accounts" - similar in a function to AWS S3 "buckets". Each "object" in the system is recorded by a row in it's "container". Given a the API URI for an object: