I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework to manage that, only to realize that many SQL queries took more than 10ms, which is unsuitable for use in a game loop.
I first thought the delay was I/O-bound, so I created an in-memory MySQL cluster. This was better, but still not real-time enough for a game loop.
Has anyone built an SQL-based entity system? If so, how did you manage to keep query times manageable?
If an SQL database isn't feasible for performance issues, what data structure could I use to retain the entity system idea and the possibilities of direct SQL requests on components?
I've heard of many MMOs running on SQL. Do they use it for only part of the data or a full entity system? How to separate database-stored and classical memory-stored structures in that case?
Edit for clarification: Yes, all game data is stored in the database. If say I run my physics system it will first get data from SQL, then do its stuff, then insert the updated data back to the database.