Changing the max_rows configuration
The max_rows
configuration is a simple but effective strategy to avoid sending too many rows over the wire, either accidentally or maliciously. Its limit determines the maximum number of rows that can be returned by any selection request. By default, it is set to 1,000, but I usually tend to set it even lower, to something around 200.
The reason is simple – most UIs don’t show 1,000 data points of anything, and if they do, they lazy-load chunks of it instead of loading all 1,000 data points at once.
So, my proposal is to start small and increase the data point value if needed. You can change it locally in config.toml
and on Supabase.com; you’ll find the setting within Project Settings | API | API Settings (further down the same screen shown in Figure 12.3).