3 ms·
Yup, the "CheckSpaghettiQuery" is a recipe for disaster. I have a query here that runs on a raspberry pi running postgresql with 7 GB of data (chat logs in a p
by kuschku 9y ago
Yup, the "CheckSpaghettiQuery" is a recipe for disaster.
I have a query here that runs on a raspberry pi running postgresql with 7 GB of data (chat logs in a postgres table, with fulltext indexing) in about 60ms.
After splitting it up far enough that the system doesn’t complain anymore, the query takes around 30 hours (I know because that’s what I started with before I merged the queries).
This is just a dumb idea in general. You can always filter the data faster in the database, and you reduce unnecessary network round-trips.