Description
Just for information, here is a benchmark I did using multiple connectors and languages on the same database, on a single thread. Drivers all performs differently.
These benchmarks allow you to see different things, a simple query, parsing/sending/managing parameters of small or big results, parsing many columns, ...
It is not a fair comparison (influence of language performance, sync/async), but gives indications of what can be improved.
Still, I would compare .net to node.js, since both are asynchronous (with lots of threads performance would downgrade less than sync drivers)
This driver is ".net communi." (community)
|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|
| java mysql | java mariadb | .net mysql | .net communi.| node mysql2 | node mariadb | python maria.| python mysql |
------------------------------------------------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|
do 1 - TEXT | 51707 | 88% | 58868 | 100% | 43180 | 73% | 34151 | 58% | 21647 | 37% | 41118 | 70% | 46249 | 79% | 12802 | 22% |
do 1000 parameters - BINARY EXECUTE ONLY | 2897 | 19% | 15356 | 100% | | | 4045 | 26% | 6832 | 44% | 7527 | 49% | 884 | 6% | 753 | 5% |
do 1000 parameters - TEXT | 2912 | 47% | 6229 | 100% | 386 | 6% | 2928 | 47% | 4363 | 70% | 5268 | 85% | | | | |
batch 100 insert of 100 chars - BINARY EXECUTE ONLY | 246 | 100% | | | | | | | | | | | | | | |
batch 100 insert of 100 chars - BULK | | | 11687 | 100% | | | | | | | 6730 | 58% | 5795 | 50% | | |
batch 100 insert of 100 chars - REWRITE | 4429 | 100% | | | | | | | | | | | | | | |
batch 100 insert of 100 chars - TEXT | 355 | 4% | 9426 | 100% | | | | | 171 | 2% | | | | | | |
batch 100 insert of 100 chars - BINARY | | | | | | | | | | | | | | | 1565 | 100% |
select 1 - TEXT | 41323 | 82% | 50674 | 100% | 27929 | 55% | 30125 | 59% | 17207 | 34% | 30264 | 60% | 34896 | 69% | 9360 | 18% |
select 1000 rows - BINARY EXECUTE ONLY | 3054 | 71% | 4321 | 100% | 856 | 20% | 2974 | 69% | 2066 | 48% | 2916 | 67% | | | | |
select 1000 rows - TEXT | 3073 | 75% | 4072 | 100% | 996 | 24% | 2977 | 73% | 2009 | 49% | 2943 | 72% | 3028 | 74% | 237 | 6% |
Select 100 int cols - BINARY EXECUTE ONLY | 10218 | 51% | 19847 | 100% | 1308 | 7% | 14883 | 75% | 3296 | 17% | 14363 | 72% | 7922 | 40% | | |
Select 100 int cols - BINARY PIPELINE | | | 9601 | 100% | | | | | | | | | | | | |
Select 100 int cols - BINARY | 6428 | 75% | 8531 | 100% | | | | | | | | | | | | |
Select 100 int cols - TEXT | 11389 | 78% | 14656 | 100% | 1645 | 11% | 10325 | 70% | 3467 | 24% | 9080 | 62% | 10500 | 72% | 1528 | 10% |
------------------------------------------------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|
Just to indicate that it would seem that simple query resulting in OK_Packet might be improved, and passing multiple parameters.