How do I开发者_JS百科 issue multiple SQL queries in a single database connection in Rails? My problem is, I have multiple records(about 200 or more records) to be checked with the database table's existing records(I am checking composite primary key values) I could use ActiveRecord's exists? method in a single transaction block. But I don't know whether ActiveRecord uses a single connection to do this instead of creating multiple connections for each entry. All I need is a way to check records existence in a single connection with a maximum performance with lower overhead on both sides Mysql and Rails ?? Any suggestions for this please..
ActiveRecord uses a single persistant database connection.
精彩评论