-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Steps to reproduce
I've created the dump file: rails db:schema:cache:dump
I've enabled AR schema caching: config.active_record.use_schema_cache_dump = true
I know AR looks for the schema file and uses it because it throws expired errors when the schema dump was from another DB (on a different schema_version)
I'm also curious how to manage different databases (test, staging prod) that are on different schema_versions. the cache will be invalid etc.
I liked the old behaviour (where oracle adapter manages cache) better.
Expected behavior
Rails shouldn't be 3 times slower on 5.2
Actual behavior
AR is doing a lot of meta queries for column data.
the Rspec suite takes 3 times as long on rails 5.2 vs 5.1
I've made an album with the different caching behaviour in rails 5.1 and 5.2:
album
I thought this might be the most readable format for this.
My conclusion from these logs is that rails 5.2 with cache_dump is an improvement for the first call.
However the second call still does more queries than 5.1 and this slows down our test suite considerably.
System configuration
Rails version: 5.2.0.rc1
Oracle enhanced adapter version: 5.2.0.rc1
Ruby version: 2.4.1
Oracle Database version: 11g for test, 12c for prod