Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark against other DBMS #11

Open
gandaldf opened this issue Apr 25, 2022 · 7 comments
Open

Benchmark against other DBMS #11

gandaldf opened this issue Apr 25, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@gandaldf
Copy link
Contributor

It would be great to have benchmarks for MSSQL, MySql and SQLite3 too!

@efectn
Copy link
Owner

efectn commented Apr 25, 2022

We may add MySQL and sqlite. I think don't need mssql

@efectn efectn added the enhancement New feature or request label Apr 25, 2022
@gandaldf
Copy link
Contributor Author

😅 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.

@efectn
Copy link
Owner

efectn commented Apr 25, 2022

😅 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

@gandaldf
Copy link
Contributor Author

gandaldf commented Apr 26, 2022

Ok! If you set the code for MySQL and SQLite I will try to expand it for MSSQL.

@efectn
Copy link
Owner

efectn commented Apr 26, 2022

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 ☺️

@gandaldf
Copy link
Contributor Author

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!

@efectn
Copy link
Owner

efectn commented May 2, 2022

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!

Thanks. I'll check it on next 2 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants