> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Frequently asked questions about developing with Squid SDK

Common questions about developing with Squid SDK.

## Real-World Applications

### What are some real-world applications for which Squid SDK was a good fit?

Squid SDK is well-suited for a wide range of blockchain indexing applications:

* **DeFi Backends** - UIs and dashboards for a variety of dApps, including DEXs,
  NFT marketplaces etc.
* **Historical Price Feeds** - Track Uniswap trades and Chainlink oracle contracts
* **Smart Contract Analysis** - Mine contract deployments and analyze bytecode
* **Real-time Bots** - Build bots with \~1-2 sec delay triggered by on-chain activity

<Tip>
  Squid SDK excels at applications requiring high-performance indexing, complex
  data transformations, and real-time processing.
</Tip>

## Technical Questions

### My squid is slow, failing, or misbehaving — where do I start?

Start with the diagnostic sequence in
[Squid SDK tips and troubleshooting](./guides/advanced/tips-and-troubleshooting):
it covers indexing speed, batch behavior, memory, reorgs, debug logging, and
common error messages. Many production issues can also be prevented by following
the [SQD Cloud best practices guide](/en/cloud/resources/best-practices).

### How does Squid SDK handle unfinalized blocks?

The Portal stream serves blocks all the way to the chain tip, including unfinalized ones. Run the source with a hot-block-aware database (`TypeormDatabase({supportHotBlocks: true})`) and chain reorganizations are rolled back automatically — handler code never sees forks.

For detailed information, see [Indexing unfinalized blocks](./guides/advanced/unfinalized-blocks).

### How do squids keep track of their sync progress?

Sync progress tracking depends on the data sink used:

**TypeORM Database**: Processors using [`TypeormDatabase`](./reference/data-stores/typeorm-store) store their state in a PostgreSQL [schema](https://www.postgresql.org/docs/current/sql-createschema.html) (not a table). By default, the schema is called `squid_processor`.

<Note>
  The schema name must be overridden in [multiprocessor
  squids](./guides/advanced/multichain-indexing).
</Note>

View sync status:

```sql theme={"system"}
SELECT * FROM squid_processor.status;
```

Reset processor status:

```sql theme={"system"}
DROP SCHEMA squid_processor CASCADE;
```

**File-based datasets**: Squids using [file-based storage](./guides/other-data-destinations) store their status in `status.txt` by default. This can be customized via the `hooks` [database option](./reference/data-stores/file-store#database-options).

### How fresh is the data served by squids?

The Portal stream serves unfinalized blocks in real time, so indexing latency is minimal out of the box — no extra configuration needed. Typically you'll see the data in under 1 s from the time it becomes available via RPC, though larger delays are possible in some cases.

### How do I enable GraphQL subscriptions for local runs?

Add the `--subscription` flag to the `serve` command in your `commands.json`:

```json theme={"system"}
{
  "commands": {
    "serve:dev": {
      "cmd": ["npx", "squid-graphql-server", "--subscription"]
    }
  }
}
```

<Note>
  See
  [Subscriptions](./reference/openreader/configuration/subscriptions)
  for detailed configuration options.
</Note>

### Is there a healthcheck endpoint for the indexer?

Yes! The processor exposes Prometheus metrics at the `/metrics` endpoint (port from `PROCESSOR_PROMETHEUS_PORT`, falling back to `PROMETHEUS_PORT`).

<Info>
  For squids deployed to SQD Cloud, metrics are publicly exposed. See
  [Monitoring in the Cloud](/en/cloud/resources/monitoring) for details.
</Info>

### Do squids have a debug mode?

Yes. Enable debug mode by setting the `SQD_DEBUG` environment variable:

```bash theme={"system"}
# Enable all debug messages
SQD_DEBUG=*

# Enable specific namespace (e.g., SQD Network queries)
SQD_DEBUG=sqd:processor:archive
```

<Tip>
  Use specific namespaces to focus on particular components and reduce log noise
  during debugging.
</Tip>
