Is Elixir a good choice for an app of searching and filtering a database of hundreds of thousands of records?

Hi all. I came across Elixir and Phoenix a couple months ago and it looked intriguing, but I didn’t really have any chance to use it. I do have the chance now, so I’m wondering if my project would be a good use case for it.

I’m building out a web app where the main functionality will be searching and filtering a database of initially thousands and eventually potentially hundreds of thousands of records. The search can be customized to filter by several categories, and doing so would require several joins across multiple tables. Maybe a partial text search on title fields, but mostly filtering based on predefined values.

It’s very possible a user would apply a filter, receive their results, and then immediately apply another filter (against unfiltered data). Kind of like they’re just exploring the data to find something appealing. So the faster the better since this part’s crucial to a good user experience.

Given the search requirements and that the goal is to have thousands of users simultaneously (the more the better), would it be worth looking into Elixir/Phoenix for performance reasons? I’m coming from a Python/Django and JS/Node background and I’m worried about potential performance issues. Haven’t built something to this scale before, so I’m also wondering if this is just premature optimization, but I’d hate for the wrong choice to be a bottleneck. Only things set in stone so far is PostgreSQL for the DB and I’d to have the back end decoupled from the front end.

Thanks!

It sounds to me like the majority of the workload is going to be on the DB side in any case, which makes choosing which server language to use less critical. Phoenix will definitely be good for shuttling all these requests back and forth to the DB, but to achieve good performance, you are going to have to do a lot of thinking around how to structure your indexes, queries, data etc on the DB side, regardless of whether you’re querying it from Elixir or Node.

Having said that, “hundreds of thousands of records” doesn’t seem like a lot of data, so as long as you’re aware of the basics of how to design a data store, you shouldn’t run into too much trouble with Postgres.

3 Likes