1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Gonzalo Riestra b3caf0c99a Improve performance of #one? and #many?
#one? and #many? generate a query like `SELECT COUNT(*) FROM posts` under the hood, and then compare if the result is equal (or greater) to 1. That count operation can be really slow for large tables or complex conditions, but there's no need to count all the records in these cases. It's much faster just by adding a limit, like `SELECT COUNT(*) FROM posts LIMIT 2`
2021-05-13 19:50:14 +02:00
..
active_record/connection_adapters
activejob Updated abbreviation for single table inheritance. 2021-04-16 11:53:05 +05:30
assets
cases Improve performance of #one? and #many? 2021-05-13 19:50:14 +02:00
fixtures Remove fixed "id" in encrypted book fixtures 2021-04-13 08:55:44 -04:00
migrations
models Derive foreign key from model name in has_many associations 2021-05-12 15:21:31 -04:00
schema Add option to skip joins for associations. 2021-04-19 11:17:31 -04:00
support
config.example.yml
config.rb