Rails has an issue with big schemas where it becomes slower over time as the app grows, to fix this issue the schema\_cache file was introduced and is enabled by default, it get updated with every migration.

We can create and update the file manually using `rake db:schema:cache:dump`.

Finally my questions:

1. What query does it actually run inside the db?
2. Does it lock the db while performing the query?
3. Finally is it safe to be ran in production?

Thank you