Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Fuser-guide%2Ffoundations%2Ftroubleshooting.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Fuser-guide%2Ffoundations%2Ftroubleshooting.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Using DataPrime to troubleshoot common query issues

## Common issues and fixes[​](#common-issues-and-fixes "Direct link to Common issues and fixes")

### 1. “My query is running too slowly”[​](#1-my-query-is-running-too-slowly "Direct link to 1. “My query is running too slowly”")

If your query feels sluggish, consider the following optimizations:

#### 1.1 Prefer exact key comparisons over fuzzy matching[​](#11-prefer-exact-key-comparisons-over-fuzzy-matching "Direct link to 1.1 Prefer exact key comparisons over fuzzy matching")

Use direct comparisons like:

```
filter my.key == 'hello'
```

instead of:

```
filter my.key.contains('hello')
```

Exact matches are significantly faster because they can take advantage of indexing. Use fuzzy logic only when necessary.

#### 1.2 Narrow your timeframe[​](#12-narrow-your-timeframe "Direct link to 1.2 Narrow your timeframe")

Querying large time ranges (weeks or months) increases scan volume and slows results. Reduce your time window when troubleshooting:

* Use the time picker to select only what’s necessary.
* Use relative time queries where applicable.

#### 1.3 Avoid expensive transformations during querying[​](#13-avoid-expensive-transformations-during-querying "Direct link to 1.3 Avoid expensive transformations during querying")

DataPrime supports dynamic transformations, but these come at a performance cost. Move complex formatting or parsing into **Parsing Rules** during ingestion to reduce query-time processing.

#### 1.4 Filter early[​](#14-filter-early "Direct link to 1.4 Filter early")

Always reduce your working set before transforming or aggregating. For example:

```
source logs

| filter name == 'Chris'

| groupby path aggregate count()
```

Filtering first minimizes the data the engine needs to process downstream.

***

### 2. “Scan limit exceeded”[​](#2-scan-limit-exceeded "Direct link to 2. “Scan limit exceeded”")

You’ve hit the scan cap for your query. This is a guardrail to prevent excessive resource usage.

#### Fixes:[​](#fixes "Direct link to Fixes:")

* **Switch to “All Logs Mode” or “All Traces Mode”**: These modes query your full archive (e.g., S3) where scan limits are much higher.
* **Simplify your query**: Remove unnecessary transformations, filters, or nested expressions that force full scans.

For full context, see: [Fair Usage Limits](https://coralogix.com/docs/docs/dataprime/language-reference/limitations/.md).

***

### 3. “The AI Query got my query wrong”[​](#3-the-ai-query-got-my-query-wrong "Direct link to 3. “The AI Query got my query wrong”")

Coralogix AI Query is powered by a large language model and AI can be wrong sometimes. Try rewording your prompt.

#### Fix:[​](#fix "Direct link to Fix:")

Refine your prompt by:

* **Specifying the exact keypaths**
* **Being concise**
* **Using domain-specific language when helpful**

***

### 4. “I get a deprecated warning when I use a command”[​](#4-i-get-a-deprecated-warning-when-i-use-a-command "Direct link to 4. “I get a deprecated warning when I use a command”")

DataPrime evolves constantly. Deprecated functions are still supported, but should be updated.

#### Fix:[​](#fix-1 "Direct link to Fix:")

* Visit the [Functions Reference](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/.md) or [Commands Reference](https://coralogix.com/docs/docs/dataprime/language-reference/commands-reference/.md).
* Search for the deprecated command and use the suggested replacement.

This ensures your queries stay future-proof.

***

## Expected output[​](#expected-output "Direct link to Expected output")

You should see:

* Noticeable speed improvements in query results after filtering or narrowing time.
* Errors related to “Scan limit exceeded” disappear in archive modes.
* AI-generated queries that are more accurate with better prompts.
* Warnings resolved after replacing deprecated syntax.

***

## Common pitfalls[​](#common-pitfalls "Direct link to Common pitfalls")

* Using `contains()` or regex matching as a default—these are slower than direct comparisons.
* Running queries over large time ranges unnecessarily.
* Assuming AI queries will always “just work”—be specific.
* Ignoring deprecation warnings, which can eventually cause query failures.
