Skip to content
This repository was archived by the owner on Feb 6, 2021. It is now read-only.

SQL insertions enhancements - #22

Open
razaina wants to merge 1 commit into
dorneanu:masterfrom
razaina:dev
Open

SQL insertions enhancements#22
razaina wants to merge 1 commit into
dorneanu:masterfrom
razaina:dev

Conversation

@razaina

@razaina razaina commented Jul 19, 2017

Copy link
Copy Markdown

SQLITE is pretty slow so currently I am using MyQSL instead to improve insertions' time execution in the database. Performances (in term of time execution) is roughly multiplied by 100 now...

I had to make some changes also as MySQL is more strict while defining the types of each element of the DB.

How to use:

For testing, I am using MariaDB through a docker container https://hub.docker.com/_/mariadb/

  • docker pull mariadb
  • docker run -p 3306:3306 --name mymariadb --e MYSQL_ROOT_PASSWORD=mystrongpassword -e MYSQL_DATABASE=mydatabase -d mariadb:latest --max_allowed_packet=100M
user='root'
password='mystrongpassword'
port='3306'
mysql_database_name='mydatabase'

DATABASE='mysql://{0}:{1}@0.0.0.0:{2}/{3}?charset=utf8mb4'.format(user, password, port, mysql_database_name)

myDB = AppSQLModel(DATABASE)
 [...]
myDB.add_classes(classes)
myDB.add_properties(properties)
[...]

@dorneanu

Copy link
Copy Markdown
Owner

Thanks for this PR! There are a lot of changes. I'll have to review them first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants