TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Seed your Rails app with Faker. Then seed 5x faster with activerecord-import

1 pointsby hbroadbentalmost 2 years ago

2 comments

hbroadbentalmost 2 years ago
Hey HN,<p>I&#x27;ve been digging into the faker gem this week, and database seeding in Ruby on Rails apps more generally. By default Rails seeds our database very inefficiently (an INSERT for each record), so we use activerecord-import to fix that.<p>This blog post covers the main things I learnt — seeding with the faker gem, speeding up seeding with activerecord-import, plus splitting our seeds by environment.<p>Happy to answer questions! Thanks, Harrison
Alifatiskalmost 2 years ago
Cool gem, seems to optimize the sql queries for bulk imports.
评论 #36764503 未加载