I'm super confused how there can be a bug that exists where I run a query on a table the alters data. The query is reported to have ran successfully and my views in Heidi show that the query ran successfully - even if I refresh the host, database and table individually, Heidi insists the data was changed. This is not the case, however, as my external application that also uses the same database does not see the changes. Upon completely shutting down and restarting Heidi, it shows that the query was in-fact, not ran, and had been just wasting my time lying to me about the data in the table.
So my question is simply, how can this possibly happen? The only thing I can think of is that there is some kind of "cache" on which my query is also ran on. Then, instead of just running the query on the database to get the data when do an action that should result in data being populated, it's returning the data from the "cache" which is somehow desynced from the actual data because somehow the query I ran was only executed on the cached copy and not the actual DB.
If this is the case, my next question is why? Why is this necessary to have a cached copy of the data? This is literally an SQL workbench. Is really necessary? Cant we just query the database each time we need data? Isn't that the whole point of the database? What are we really saving optimization wise by doing that?
I'd love to know, because it's honestly so confusing to me (and frustrating) that this is not only a "thing" but a "thing" that has been around for as long as it has.