Open odscrachel opened 11 months ago
@odscrachel @odscjames I think SQLite now supports Right and Full Outer Joins.
https://www.sqlitetutorial.net/sqlite-full-outer-join/ https://www.sqlitetutorial.net/sqlite-right-join/
@BibianaC Cool! Can you just run some test queries on our live server and make sure we are running a good enough version of SQLite/Datasette? We may be running an older version.
@odscjames
I have ran a query in https://datasette.codeforiati.org/iati
. It is not supported.
I don't see where is the datasette is hosted to check what version is running.
I have checked the change history of SQLite.
2022-06-25 (3.39.0)
Add (long overdue) support for [RIGHT and FULL OUTER JOIN](https://www.sqlite.org/lang_select.html#rjoin).
@odscjames We are using Ubuntu 22.04 which comes with SQLite 3.31 (The SQLite fix was done two months later 22.06).
The latest Ubuntu is 24.04 which comes with SQLite 3.45.
Is it viable to upgrade now to the latest Ubuntu?
That's probably the easiest fix, and a good thing to do anyway. Thanks.
Whoops, the language in my commit message wasn't quite correct - this isn't fixed until new server goes live
Ok, putting this upgrade on hold.
Problems are found running tables on the new Ubuntu. A particular SQL query would take up all the memory until Linux would OOM Kill the Postgres server.
The query is the CREATE TABLE "_object_type_aggregate" ...
one.
( Also note, when doing this upgrade we were confused by a python crash but this is nothing to do with this upgrade: https://github.com/codeforIATI/iati-tables/issues/57 )
This isn't a big issue and I don't think it's supported in SQLite, which is what datasette is built on. At the very least we could add this to some documentation with some instructions on work arounds.