© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
28 replies
murad IS the api

Supabase Storage: can/should I add indexes to speed up .list()?

I’m using these functions to list files from Supabase Storage, but the calls are quite slow.

Questions:
Is it safe (or even possible) to add indexes to improve performance?
If yes, exactly where should the index be added?
const productImagesQuery = (shopId: string) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/products`, {
        limit: 1000,
    });

const logoImageQuery = (shopId: string, branchId: number) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/logo`, {
        limit: 1,
        search: String(branchId),
    });

const bannerImageQuery = (shopId: string, branchId: number) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/banner`, {
        limit: 1,
        search: String(branchId),
    });
const productImagesQuery = (shopId: string) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/products`, {
        limit: 1000,
    });

const logoImageQuery = (shopId: string, branchId: number) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/logo`, {
        limit: 1,
        search: String(branchId),
    });

const bannerImageQuery = (shopId: string, branchId: number) => supabase
    .storage
    .from('public_uploads')
    .list(`${shopId}/banner`, {
        limit: 1,
        search: String(branchId),
    });
image.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

.emptyFolderPlaceholder shows up in supabase.storage.list() call
SupabaseSSupabase / help-and-questions
3y ago
Supabase storage list not working
SupabaseSSupabase / help-and-questions
8mo ago
supabase cli, exclude services (speed up starting)
SupabaseSSupabase / help-and-questions
4y ago
Supabase Storage
SupabaseSSupabase / help-and-questions
4y ago