<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="215908" data-post-id="215908">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="soup" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/soup/120/31425_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  soup
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Interesting post. Looks like that could be a <em>super</em> annoying bottleneck to try and track down if it hit you.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="215908" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/system-resources-used-when-using-elixir-with-mysql-vs-postgresql/40112/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-215908" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="215908"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="216476" data-post-id="216476">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dojap" data-post="5" data-topic="40112">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/958977/48.png" class="avatar"> dojap:</div>
<blockquote>
<p>98 - 99% of everything in my service will be reads, only a tiny fraction will be writes to the database.</p>
</blockquote>
</aside>
<p>Consider <a href="https://www.sqlite.org/index.html" rel="noopener nofollow ugc">sqlite</a> then? You won’t need a separate DB server, everything happens right there inside your app, no network connections to DBs. You will only have 1 server – your Elixir application server. You will not have a separate DB server.</p>
<hr>
<p>As a broader reply to your scaling problems, others are correct. You will hit 1000 other problems before your choice of DB <em>really</em> starts to matter. And let’s be honest here, most businesses never get to that scale.</p>
<p>That, plus modern DBs like PostgreSQL and MySQL have decades of development behind them and are extremely efficient. You should worry how efficient your Elixir code is instead. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> And even then, don’t concern yourself with this before your application server starts lagging.</p>
<p>To expand on – and explain in more details – on what <a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> said: <strong>do NOT pick technologies based on which huge company is using them</strong>! Reason: they have very specific problems and they have to micromanage their technology choices to hell and back because for them that might mean the difference between paying for 100 servers or 2000 servers, e.g. they might end up paying non-trivial amounts of cash if they misstep. You don’t have that problem.</p>
<p>Don’t pay attention to what Google / Netflix / Amazon / Microsoft / Apple / Uber etc. use. They use those technologies because they solve a very specific problem for them.</p>
<p>Any normal smaller business is very likely to <em>severely</em> shoot themselves in the foot if they just blindly follow a corporation’s tech choices.</p>
<p>And finally, deciding between using PostgreSQL or MySQL is 99% irrelevant because you’re very likely to pick a managed DB instance <em>a la</em> Amazon’s RDS or DigitalOcean’s DB droplets where the pricing completely hides any underlying performance differences like CPU or I/O or RAM usage. Chances are, you will still pay at least $25 a month no matter which DB you pick.</p>
<hr>
<p>A piece of advice: don’t agonize over such details because even though they might seem important in your head, in practice these details will be trivialized and hidden from you almost everywhere you go (I mean the hosted solutions). Those toy problems are fun to think about when you are a hobbyist – but if you want to make an actual business you should stick to the well-trodden and beaten paths because that hugely increases your chances to get support from the community as you progress with your code. In Elixir’s case, definitely stick with PostgreSQL because that’s Ecto’s first class DB citizen.</p>
<p>But again, for what you describe, it seems that <code>sqlite</code> might actually be the best choice.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="216476" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/system-resources-used-when-using-elixir-with-mysql-vs-postgresql/40112/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-216476" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="216476"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>