3 ms·
Is the same InnoDB data available via MySQL itself still using standard SQL syntax, or is utilizing InnoDB in this manner locking it out from that? Having a du
by elliottcarlson 16y ago
Is the same InnoDB data available via MySQL itself still using standard SQL syntax, or is utilizing InnoDB in this manner locking it out from that?
Having a dual angle of accessing the data could be very beneficial when it comes to reporting etc, while maintaining a high throughput access for the actual production code.
- danudey 16y agoYou do get both forms of access, so you can make queries from both interfaces. I believe there is a locking mechanism whereby the HandlerSocket interface holds its own lock for all its concurrent client, which it releases occasionally to allow MySQL to have access as well ('occasionally' in this case might be 'a hundred times a second' for all I know). Note that this doesn't give you SQL or any of the benefits. For example, you can't do joins (but you could write them manually, since you get better throughput manually so the speed might outweigh the inefficiencies of multiple round-trips.
- ams6110 16y agoUnlikely that you could manually join tables any faster than MySQL can, given that the optimization of joins in MySQL has surely been given considerable attention.
- danudey 16y agoMaybe not, but if you're bypassing MySQL's internal mutexes and SQL parser to get significantly faster results, it's possible that those speed improvements would outweigh doing two fetches via HandlerSocket.