News for hackers. Stuff that matters.
Re:SQLite Release 3.25.0 adds support for window functions by Dinux on Wednesday August 15, 2018 @04:36AM (#17764522)
Not sure if SQLite is still a 'lite' database
Re:SQLite Release 3.25.0 adds support for window functions by MarkusWinand on Wednesday August 15, 2018 @04:46AM (#17764563)
I've just built the snapshot. The binary is still less than 2MB.

And it works:

  sqlite> with t(x) as (values (1), (2)) select sum(x) over (order by x) from t;
  1
  3
Re:SQLite Release 3.25.0 adds support for window functions by davidgould on Wednesday August 15, 2018 @05:19AM (#17764680)
I just checked a stripped copy of postgresql-10 built with all options on and it is 7MB. That could be reduced a little by leaving out language support and ssl support etc.
Re:SQLite Release 3.25.0 adds support for window functions by plq on Wednesday August 15, 2018 @06:11AM (#17764863)
While binary size could certainly be a factor in a good deal of embedded environments, we also need to look at the resource requirements of the binary in question as well.

Sqlite doesn't need too much more memory than what its binary needs whereas with postgresql, you need all sorts of bells and whistles just to get the database system to boot.

Re:SQLite Release 3.25.0 adds support for window functions by davidgould on Wednesday August 15, 2018 @07:08AM (#17765157)
Well, sure, sqllite is smaller than postgres, but database system performance is largely dictated by the size of the buffer cache. For something like a configuration database (a great use of sqllite) this does not matter. But for more than a very modest amount of data more memory for buffers will benefit both postgresql and sqllite.

Anyway, not trying to make the case that postgresql is small compared to sqllite, it obviously isn't, just wanted to point out that it's not _that_ big either.

Re:SQLite Release 3.25.0 adds support for window functions by est on Wednesday August 15, 2018 @05:27AM (#17764720)
Do you have tutorials to strip lang and ssl?

Is it possible to dynamic link system openssl to reduce size?

Re:SQLite Release 3.25.0 adds support for window functions by davidgould on Wednesday August 15, 2018 @07:04AM (#17765139)
If you look at the build instructions you will see that in the ./configure step you can enable and disable different features. Try ./configure --help to get a list.

It is dynamically linked to openssl, but you can configure out the internal code to support the functionality.

"strip" however meant the unix strip command to remove debug symbols.

Re:SQLite Release 3.25.0 adds support for window functions by mamcx on Wednesday August 15, 2018 @10:17AM (#17766159)
And how possible to embeb it in a mobile device? Too crazy, I imagine...
Re:SQLite Release 3.25.0 adds support for window functions by unixhero on Wednesday August 15, 2018 @04:53AM (#17764584)
Insightful. Thanks!
Re:SQLite Release 3.25.0 adds support for window functions by amyjess on Wednesday August 15, 2018 @02:17PM (#17768383)
To me, what makes it 'lite' is that it doesn't have a client-server architecture that requires a running daemon. It's just a file format and a library designed to interact with it.
Re:SQLite Release 3.25.0 adds support for window functions by interfixus on Wednesday August 15, 2018 @08:29AM (#17765498)
I just had a look at the executable of my latest - extremely simple - webapp. A 64 bit elf, statically linked with Musl libc and SQLite, written in Nim. 1.4MB all told, with no optimizations whatsoever. In the year 2018 AD, we count that as light.
Re:SQLite Release 3.25.0 adds support for window functions by MrEfficiency on Wednesday August 15, 2018 @10:18AM (#17766168)
Interesting, I noticed how big my database file was as well.

I considered the Lite meant offline storage.

Still a huge fan, I went from noob programmer to knowing databases because how quickly I could make and play with databases in sqlite.

Re:SQLite Release 3.25.0 adds support for window functions by cryptonector on Wednesday August 15, 2018 @11:06AM (#17766560)
The "lite" refers to things like:

   - it only has b*-tree indexes
   - it only has one index per-table source
Re:SQLite Release 3.25.0 adds support for window functions by SQLite on Wednesday August 15, 2018 @12:05PM (#17767098)
> it only has one index per-table source

I don't know for sure what this means, but it sounds like it is incorrect.

Re:SQLite Release 3.25.0 adds support for window functions by cryptonector on Wednesday August 15, 2018 @05:25PM (#17769906)
I could swear I've seen you say this. Maybe I'm mis-remembering? ISTR it was that for each table source in a query SQLite3 uses just one index (or the table itself) for indexing or scanning to find relevant rows in that table source.
Re:SQLite Release 3.25.0 adds support for window functions by SQLite on Wednesday August 15, 2018 @05:49PM (#17770087)
SQLite can use multiple indexes if there are OR terms in the WHERE clause.

SQLite tries to only uses indexes in situations where they help the query run faster. SQLite is not limited in its use of indexes. It is just that the use of multiple indexes for a single FROM-clause term is rarely helpful.

Re:SQLite Release 3.25.0 adds support for window functions by cryptonector on Wednesday August 15, 2018 @06:15PM (#17770215)
Ah, OK, thanks!
Re:SQLite Release 3.25.0 adds support for window functions by felixge on Wednesday August 15, 2018 @04:43AM (#17764551)
In the category of SQL databases, it certainly is. I mean it's not called LiteDB for a reason I suppose ;).