[sqlite] Does column order matter for performance?

2015-05-04 Thread Hick Gunter
r 1, followed by the actual blob data. So the amount of work required to locate the blob data varies considerably. -Urspr?ngliche Nachricht- Von: Simon Slavin [mailto:slavins at bigfraud.org] Gesendet: Freitag, 01. Mai 2015 11:32 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Doe

[sqlite] Does column order matter for performance?

2015-05-01 Thread Simon Slavin
On 1 May 2015, at 6:49am, Pol-Online wrote: > I?m curious: how much work are we talking about here? If I have 99 INTEGER > fields followed by a BLOB one, to access the BLOB field, does SQLite need to > compute the size of each previous INTEGER field first? Given the way that SQLite uses

[sqlite] Does column order matter for performance?

2015-04-30 Thread Pol-Online
> (2) Even if the row is all on one page, SQLite has to compute sizes of > all prior columns and add those sizes together in order to find the > offset to a particular column in that row. The fewer prior columns > there are, the less work is involved for this step. I?m curious: how much work are

[sqlite] Does column order matter for performance?

2015-04-30 Thread Simon Slavin
On 30 Apr 2015, at 6:16pm, Drago, William @ CSG - NARDA-MITEQ wrote: > Read Mr. Hipp's reply to me when I asked a similar question: To rephrase (1) slightly, when reading a row from a table, SQLite reads up to the last column asked for and no further. So if you have columns you rarely need

[sqlite] Does column order matter for performance?

2015-04-30 Thread Drago, William @ CSG - NARDA-MITEQ
lists.sqlite.org [mailto:sqlite- > users-bounces at mailinglists.sqlite.org] On Behalf Of Pol-Online > Sent: Thursday, April 30, 2015 12:45 PM > To: sqlite-users at mailinglists.sqlite.org > Subject: [sqlite] Does column order matter for performance? > > Hi, > > I wasn?t able to

[sqlite] Does column order matter for performance?

2015-04-30 Thread Richard Hipp
On 4/30/15, James K. Lowden wrote: > > SQLite keeps its rows in pages and reads whole pages. Within a page it > references rows and columns by offset. Every location within a page is > accessed in constant time. So column order doesn't matter because > page-offset doesn't matter. > It's more

[sqlite] Does column order matter for performance?

2015-04-30 Thread James K. Lowden
On Thu, 30 Apr 2015 09:45:14 -0700 Pol-Online wrote: > I wasn?t able to find the answer to this question online: does the > column order matter for SQLite performance? E.g. should you put fixed > width columns like INTEGER before TEXT or BLOB? I'm going to check that box as No.

[sqlite] Does column order matter for performance?

2015-04-30 Thread Pol-Online
Hi, I wasn?t able to find the answer to this question online: does the column order matter for SQLite performance? E.g. should you put fixed width columns like INTEGER before TEXT or BLOB? -Pol Pol-Online info at pol-online.net (mailto:info at pol