<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Studies Multiverse</title>
    <description>The latest articles on DEV Community by Studies Multiverse (@studiesmultiverse).</description>
    <link>https://dev.to/studiesmultiverse</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4191839%2F61350630-ce3e-43fb-9365-c0bd283359e1.png</url>
      <title>DEV Community: Studies Multiverse</title>
      <link>https://dev.to/studiesmultiverse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/studiesmultiverse"/>
    <language>en</language>
    <item>
      <title>Crawlers found 50,000 pages on my free side project. Here's what it did to my database bill.</title>
      <dc:creator>Studies Multiverse</dc:creator>
      <pubDate>Sun, 18 Oct 2026 09:39:58 +0000</pubDate>
      <link>https://dev.to/studiesmultiverse/crawlers-found-50000-pages-on-my-free-side-project-heres-what-it-did-to-my-database-bill-3o1o</link>
      <guid>https://dev.to/studiesmultiverse/crawlers-found-50000-pages-on-my-free-side-project-heres-what-it-did-to-my-database-bill-3o1o</guid>
      <description>&lt;p&gt;Studies Multiverse is a free study-abroad directory: 31,000 institutions in 224 countries, course lists, and tools for costs, post-study work rules and scholarships. It runs on Cloudflare Workers and D1 (SQLite), server-rendered, in 7 languages.&lt;/p&gt;

&lt;p&gt;Last week the D1 dashboard showed 5 billion rows read in a day. Real visitors were a tiny fraction of that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was reading them
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Meta's crawlers (meta-externalagent, meta-webindexer) were walking every directory listing in all 7 languages.&lt;/li&gt;
&lt;li&gt;Applebot and others found the filtered URLs: every subject x city x page combination is a new address.&lt;/li&gt;
&lt;li&gt;50,000 course pages each ran a "same course at other places" query that read about 2,600 rows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Three fixes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Make the index usable.&lt;/strong&gt; My list query had optional filters written as &lt;code&gt;(?2 IS NULL OR e.kind = ?2)&lt;/code&gt;. SQLite can't use an index through that, so every page counted the whole table. A fast path that builds the WHERE clause from only the filters in use dropped the main listing from ~30,000 rows to a few hundred.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the missing indexes.&lt;/strong&gt; Two composite indexes on the course table, &lt;code&gt;(country_slug, search_key)&lt;/code&gt; and &lt;code&gt;(country_slug, entity_id)&lt;/code&gt;, turned the heaviest query into an index lookup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't serve crawlers what they can't index.&lt;/strong&gt; Filtered lists are noindex and canonical to the plain list anyway, so crawlers now get a 301 to the plain list. Course detail pages (noindex for now) return a short 403 to crawlers. People see everything as before.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check rows read, not request counts. A cheap-looking page can be the expensive one.&lt;/li&gt;
&lt;li&gt;"Optional filter" SQL patterns quietly disable indexes. Run &lt;code&gt;EXPLAIN QUERY PLAN&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If a URL is noindex, crawlers have no reason to fetch it at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The site: &lt;a href="https://studiesmultiverse.com" rel="noopener noreferrer"&gt;https://studiesmultiverse.com&lt;/a&gt;. Feedback welcome.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sqlite</category>
      <category>cloudflare</category>
      <category>sideprojects</category>
    </item>
  </channel>
</rss>
