betodealmeida opened a new pull request #13561:
URL: https://github.com/apache/superset/pull/13561


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ```
   python scripts/benchmark_migration.py 
superset/migrations/versions/c501b7c653a3_add_missing_uuid_column.py --limit 
10000 --force
   Loaded your LOCAL configuration at 
[/Users/beto/Projects/incubator-superset/superset_config.py]
   logging was configured successfully
   INFO:superset.utils.logging_configurator:logging was configured successfully
   
/Users/beto/Projects/incubator-superset/venv/lib/python3.8/site-packages/flask_caching/__init__.py:191:
 UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively 
disabled.
     warnings.warn(
   Importing migration script: 
superset/migrations/versions/c501b7c653a3_add_missing_uuid_column.py
   Migration goes from 070c043f2fdb to c501b7c653a3
   Current version of the DB is 070c043f2fdb
   
   Identifying models used in the migration:
   - Database (100 rows in table dbs)
   - DashboardEmailSchedule (100 rows in table dashboard_email_schedules)
   - SliceEmailSchedule (100 rows in table slice_email_schedules)
   - Slice (113 rows in table slices)
   - TableColumn (773 rows in table table_columns)
   - SqlMetric (100 rows in table sql_metrics)
   - SqlaTable (100 rows in table tables)
   - DruidCluster (100 rows in table clusters)
   - DruidColumn (0 rows in table columns)
   - DruidMetric (0 rows in table metrics)
   - DruidDatasource (90 rows in table datasources)
   - Dashboard (100 rows in table dashboards)
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   Benchmarking migration
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade 070c043f2fdb -> 
c501b7c653a3, add missing uuid column
   
   Updating dasboard position json with slice uuid.. Done.
   
   Migration on current DB took: 0.43 seconds
   Running with at least 10 entities of each model
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   Migration for 10+ entities took: 0.34 seconds
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running downgrade c501b7c653a3 -> 
070c043f2fdb, add missing uuid column
   Running with at least 100 entities of each model
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade 070c043f2fdb -> 
c501b7c653a3, add missing uuid column
   
   Updating dasboard position json with slice uuid.. Done.
   
   Migration for 100+ entities took: 0.47 seconds
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running downgrade c501b7c653a3 -> 
070c043f2fdb, add missing uuid column
   Running with at least 1000 entities of each model
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade 070c043f2fdb -> 
c501b7c653a3, add missing uuid column
   
   Updating dasboard position json with slice uuid.. Done.
   
   Migration for 1000+ entities took: 2.91 seconds
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running downgrade c501b7c653a3 -> 
070c043f2fdb, add missing uuid column
   Running with at least 10000 entities of each model
   :qINFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running upgrade 070c043f2fdb -> 
c501b7c653a3, add missing uuid column
   
   Updating dasboard position json with slice uuid.. Done.
   
   Migration for 10000+ entities took: 114.36 seconds
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume transactional DDL.
   INFO  [alembic.runtime.migration] Running downgrade c501b7c653a3 -> 
070c043f2fdb, add missing uuid column
   Cleaning up DB
   
   Results:
   
   Current: 0.43 s
   10+: 0.34 s
   100+: 0.47 s
   1000+: 2.91 s
   10000+: 114.36 s
   ```
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to