Error with in_transaction decorator

I just shrunk a table with 3000 rows to 6 rows by condensing tons of stuff in a Simple Object column. One of the value contains a 150kb json object. That json object is a list of dictionary, which in another world would have been a linked table with hundreds of rows. I almost always needed to scan the whole table, so I decided to put it in one single value. It is much faster to read and write 150kb from/to one value than reading/writing the same 150kb by scanning hundreds of rows.

I use columns for the values I need to sort and filter by, then I put everything else inside a list of dictionaries in one (sometimes more) Simple Object columns. It’s an hybrid approach, half SQL and half MongoDB.

I also try to stay away from linking tables and again put as much info as I can inside Simple Object columns.

Apps that would have used 20-30 tables are down to 3-4 tables, and each table has a fraction of the rows.

Obviously I can’t always do that, and sometimes I even use SQL (available with dedicated plans) and play with complex queries. But for most apps I use and abuse Simple Object columns and my life is much easier.