To insert same row into DB you can use raw SQL. We can generate data to insert from select creating data we need and multiply it with generate_series() function.
This way we will be generating just one query to DB and don't need to transfer 3kk values.
query = """INSERT INTO users (points, inserted_at, updated_at)SELECT 0, now(), now()FROM generate_series(1, 1000000);"""Ecto.Adapters.SQL.query!(Remote.Repo, query, [])