SQLite Forum

Serious problems with STORED columns
Login
> So why would I ever use a STORED field instead of a real (persistent) field if the physicals are identical?

To save yourself the trouble of having to manually recalculate that column and update it back into the database every time one of its constituents change.

To be clear: That's your ONLY advantage with a STORED column. It's still a pretty good advantage though, right?

With a non-stored column, you get the added benefit of saving the data space, but you pay for that with increased CPU cycles when querying.

There is no magic here. No red pill. It's all cost/value benefit ratios and as an engineer/programmer you need to pick the ratio that makes most sense for your application.