Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Slow seeding when having a large seed file and an anonymous block.

Closed
#6,686 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@7ttp is already working on this.

Since Sep 21, 2026.

Assessment

This issue has not been assessed yet.

Description

🐛 Bug supabase/cli
Affected area

Seeding

Supabase CLI version

2.117.0

Operating system

linux x64

Installation method

No response

Command
supabase db reset
Actual output
Very slow seed execution, over one minute
Expected behavior

Fast seed, as fast as when directly running with postgres, milliseconds at most.

Steps to reproduce

Have a seed file that looks like

DO $$
BEGIN

/* 1 MB block of SQL code */

END $$;

Run the seed, e.g. by supabase db reset.
This takes over a minute to run, even if the sql itself is fast.

Removing the anonymous block makes it fast. It looks like the seed sql parser has some quadratic complexity for finding the closing $$.
Other tags with open/close semantics also cause slowness, like /* ... */ comments, a large file with those is also slow. Single line comments -- are not slow.

Crash report ID

No response

Docker and service versions

Additional context

No response

Dominant language
TypeScript
Stars
2.4k
Forks
531
Avg merge
1d 2h
Merged PRs (30d)
347

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/cli

All issues in supabase/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.