go-orm-benchmarks
go-orm-benchmarks copied to clipboard
Benchmark against other DBMS
It would be great to have benchmarks for MSSQL, MySql and SQLite3 too!
We may add MySQL and sqlite. I think don't need mssql
π It's the one I use most... and I think it used often by others, maybe not as much as Postgres or MySQL but something to care about.
π It's the one I use most... and I think it used often by others, maybe not as much as Postgres or MySQL but something to care about.
I don't have any experience with Microsoft stack. If sameone do it, why not
Ok! If you set the code for MySQL and SQLite I will try to expand it for MSSQL.
Ok! If you set the code for MySQL and SQLite I will try to expand it for MSSQL.
I'll think how to do it shortly. If you have an idea, dont forget sharing βΊοΈ
The first thing that comes to my mind is to rename every current bench file with _pg suffix, make copies of them adding _mysql, _sqlite, _mssql.
For every new copy then adapt the code inside to target a new DBMS; for example:
st := NewSuite("beego")
to:
st := NewSuite("beego_pg")
st := NewSuite("beego_mysql")
st := NewSuite("beego_sqlite")
st := NewSuite("beego_mssql")
and obviously rename all its functions; for example:
BeegoOrmInsert
to:
BeegoOrmInsertPg
BeegoOrmInsertMysql
BeegoOrmInsertSqlite
BeegoOrmInsertMssql and so on...
I know it's pretty brutal; in an ideal world you should just need to adapt the init() func to target a different DBMS, but in the real worl every ORM handles queries in different way for each DBMS (I'm thinking to raw, bun or dbr). Some ORM maybe couldn't support every DBMS we are testing, so at the end of the day you need a place where handle every specific case. This is just my first thought. any better idea is welcome!
The first thing that comes to my mind is to rename every current bench file with
_pgsuffix, make copies of them adding_mysql,_sqlite,_mssql. For every new copy then adapt the code inside to target a new DBMS; for example:
st := NewSuite("beego")to:st := NewSuite("beego_pg")st := NewSuite("beego_mysql")st := NewSuite("beego_sqlite")st := NewSuite("beego_mssql")and obviously rename all its functions; for example:
BeegoOrmInsertto:BeegoOrmInsertPgBeegoOrmInsertMysqlBeegoOrmInsertSqliteBeegoOrmInsertMssqland so on...I know it's pretty brutal; in an ideal world you should just need to adapt the init() func to target a different DBMS, but in the real worl every ORM handles queries in different way for each DBMS (I'm thinking to raw, bun or dbr). Some ORM maybe couldn't support every DBMS we are testing, so at the end of the day you need a place where handle every specific case. This is just my first thought. any better idea is welcome!
Thanks. I'll check it on next 2 weeks.