# How can I improve this query?

**URL:** <https://discourse.rom-rb.org/t/how-can-i-improve-this-query/533>\
**Category:** Uncategorized\
**Created:** [April 18, 2022, 11:37am UTC](https://discourse.rom-rb.org/t/how-can-i-improve-this-query/533 "2022-04-18T11:37:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elithecho](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/elithecho/32/269_2.png) [@elithecho](https://discourse.rom-rb.org/u/elithecho)\
**Post date:** [April 18, 2022, 11:37am UTC](https://discourse.rom-rb.org/t/how-can-i-improve-this-query/533/1 "2022-04-18T11:37:40Z")

</div>

I have a small repo for trying out ROM and using multi\_insert. I think it could be improved but am wondering how can I do this without a separate query?

> <https://github.com/elithecho/rom-test/blob/main/lib/app/repos/user_repo.rb#L21-L39>
