I want to force an expensive activerecord database query to test whether a gem I installed, which makes AR queries asynchronous, actually works. I know that in SQL you can do something like SELECT sleep(5); Is there a way to do this through ActiveRecord?
I want to force an expensive activerecord database query to test whether a gem
Share
If your SQL implementation supports the “sleep” command, you can force ActiveRecord to execute it (and any other arbitrary SQL) like so: