Live data from Hacker News

SQLite Release 3.25.0 adds support for window functions

sqlite.org

51–60 of 116 posts

Re: SQLite Release 3.25.0 adds support for window functions

#51
post #27

A bit offtopic but has anyone tried to replicate sqlite databases? Using rqlite https://github.com/rqlite/rqlite or something else?

I am interested in this topic as well, although sqlite explicitly says that it is not meant for client-server configuration. I still want to see if it is feasible and someone is using it in production.

Expensify uses SQLite for their core database.

https://blog.expensify.com/2018/01/08/scaling-sqlite-to-4m-q...

Re: SQLite Release 3.25.0 adds support for window functions

#52
post #27

A bit offtopic but has anyone tried to replicate sqlite databases? Using rqlite https://github.com/rqlite/rqlite or something else?

Almost all my main apps have a sync history. Before was using batch processing and a version field:

customer: name, ...., version = 1

update customer: name, ...., version = 2

and sync manually. Now I use a log/event sourcing like setup, where every write to the BD is also stored in a log table and sync from there. Much better!

Re: SQLite Release 3.25.0 adds support for window functions

#54

Earlier quoted context omitted.

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

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.

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

#55
post #2

Not sure if SQLite is still a 'lite' database

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

#56
post #52
post #27

A bit offtopic but has anyone tried to replicate sqlite databases? Using rqlite https://github.com/rqlite/rqlite or something else?

Almost all my main apps have a sync history. Before was using batch processing and a version field: customer: name, ...., version = 1 update customer: name, ...., version = 2 and sync manually. Now I use a log/event sourcing like setup, where every write to the BD is also stored in a log table and sync from there. Much better!

Make your logged events invertible and get an undo/redo function for free. That's how I kill three to four birds with one stone.

Re: SQLite Release 3.25.0 adds support for window functions

#57

Earlier quoted context omitted.

I am interested in this topic as well, although sqlite explicitly says that it is not meant for client-server configuration. I still want to see if it is feasible and someone is using it in production.

I got thrown into a legacy web project that used sqlite as the database. It was a small internal-only app, I guess the original developer(s) figured it was so small that sqlite would be plenty and it would reduce the environment complexity. Unsurprisingly they were wrong. It was small, but sqlite couldn't handle multiple users. I believe this was before sqlite had WAL support, so reading would lock the DB. The 'solut…

Since 2010, SQLite has had Write-Ahead-Logging. Perhaps your project was using an older version of SQLite? https://www.sqlite.org/wal.html

Re: SQLite Release 3.25.0 adds support for window functions

#58
The query optimizer improvements are pretty cool too.

Even though, I don't really understand that one : "The IN-early-out optimization: When doing a look-up on a multi-column index and an IN operator is used on a column other than the left-most column, then if no rows match against the first IN value, check to make sure there exist rows that match the columns to the right before continuing with the next IN value. ". I would think there's no need to check the right column(s) if the leftmost one has no match...

Re: SQLite Release 3.25.0 adds support for window functions

#59
post #52

Earlier quoted context omitted.

Almost all my main apps have a sync history. Before was using batch processing and a version field: customer: name, ...., version = 1 update customer: name, ...., version = 2 and sync manually. Now I use a log/event sourcing like setup, where every write to the BD is also stored in a log table and sync from there. Much better!

Make your logged events invertible and get an undo/redo function for free. That's how I kill three to four birds with one stone.

invertible? What is that?

Re: SQLite Release 3.25.0 adds support for window functions

#60
post #27

A bit offtopic but has anyone tried to replicate sqlite databases? Using rqlite https://github.com/rqlite/rqlite or something else?

I am interested in this topic as well, although sqlite explicitly says that it is not meant for client-server configuration. I still want to see if it is feasible and someone is using it in production.

What they mean by that comment is that it doesn't have users in the sense that mysql, SQL Server, etc have. https://www.sqlite.org/whentouse.html The documentations says that it works well for websites. For client server, you just need to make an API that handles the interactions with the database.
Post reply on HN