# Running Scans

> Learn how to execute DQS scans, monitor progress, handle large datasets, and schedule recurring scans.

Source: https://dataqualitysense.com/resources/using-dqs/running-scans/
Last updated: 2026-06-03

---

## How Scans Work

When you run a scan, DQS processes your Salesforce records against the capabilities you configured. The scan runs in the background using Salesforce Batch Apex, so you can continue working while it processes.

DQS respects Salesforce governor limits automatically. Your org stays responsive during scans.

## Running a Manual Scan

### Starting a Scan

1. Open DQS from the App Launcher
2. Find your Definition in the list
3. Click **Run Scan** (or the play icon)
4. Confirm to start

The scan begins processing immediately.

### Scan Status Indicators

| Status | Icon | Meaning |
|--------|------|---------|
| Queued | Clock | Waiting to start |
| Processing | Spinner | Currently running |
| Completed | Checkmark | Finished successfully |
| Failed | X | Error occurred |

### Viewing Active Scans

The DQS home screen shows all running scans:
- Definition name
- Progress percentage
- Records processed / total
- Elapsed time
- Estimated time remaining

## Understanding Progress

### Progress Tracking

DQS processes records in batches. The progress bar shows:

- **Batches completed** out of total batches
- **Records processed** out of total records
- **Current capability** being evaluated

Example: "Processing batch 5 of 12 (2,500 of 6,000 records) - Completeness"

### Processing Order

DQS evaluates capabilities in this order:

1. Completeness (fast field checks)
2. Validity (format pattern matching)
3. Timeliness (date comparisons)
4. Consistency (value conformance)
5. Uniqueness (duplicate detection)
6. AI Readiness capabilities

Lower-cost capabilities run first to provide quick feedback.

### Estimated Time

Scan duration depends on:

| Factor | Impact |
|--------|--------|
| Record count | More records = longer time |
| Field count | More fields = longer time |
| Capability cost | HIGH-cost capabilities take longer |
| Org load | Busy orgs process slower |

Typical processing rates:

| Record Count | Estimated Time |
|--------------|----------------|
| 1,000 | Under 1 minute |
| 10,000 | 2-5 minutes |
| 100,000 | 15-30 minutes |
| 1,000,000+ | 1-2 hours |

These are estimates. Actual time varies by capability selection and org activity.

## Processing Costs

Each capability has a processing cost that affects scan duration.

### Cost Levels

| Cost | Capabilities | Processing Notes |
|------|--------------|------------------|
| LOW | Completeness, Validity | Simple field checks per record |
| MEDIUM | Timeliness, Consistency, PII Detection | Pattern analysis and date math |
| HIGH | Uniqueness | Cross-record comparisons |

### Cost Calculation

The Definition summary shows estimated total cost:

- **Low** - All selected capabilities are LOW cost
- **Medium** - At least one MEDIUM cost capability
- **High** - At least one HIGH cost capability

> **Tip:** For your first scan on a large dataset, start with LOW-cost capabilities only. Add HIGH-cost capabilities once you understand the baseline.

## Batch Processing Details

### How Batch Apex Works

DQS uses Salesforce Batch Apex to process records. Here's what that means:

1. Records are divided into batches (default: 200 records per batch)
2. Each batch processes independently
3. If one batch fails, others continue
4. Governor limits reset between batches

This approach allows DQS to:
- Process millions of records
- Respect Salesforce limits
- Run without blocking users
- Resume if interrupted

### Salesforce Governor Limits

Batch Apex has these key limits:

| Limit | Value | Notes |
|-------|-------|-------|
| Max queued batch jobs | 5 | DQS uses 1 job per scan |
| Records via QueryLocator | 50 million | More than enough for most orgs |
| Daily batch executions | 250,000 | Across all batch jobs in org |

DQS is designed to stay well within these limits.

### Batch Size Optimization

DQS adjusts batch size based on capability complexity:

| Capability Type | Batch Size |
|----------------|------------|
| LOW cost only | 200 records |
| MEDIUM cost included | 200 records |
| HIGH cost included | 100 records |

Smaller batches for complex capabilities prevent timeout errors.

## Handling Large Datasets

### Datasets Over 100,000 Records

For large datasets, follow these practices:

1. **Use filters** to limit scope
2. **Start with LOW-cost capabilities** first
3. **Run during off-peak hours** when possible
4. **Monitor progress** for any issues

### Datasets Over 1 Million Records

For very large datasets:

1. **Segment your data** using multiple Definitions with filters
2. **Schedule scans** during maintenance windows
3. **Run capabilities separately** if needed
4. **Use segmentation** to process data in parallel

Example segmentation:
- Definition A: Contacts where Region = 'Americas'
- Definition B: Contacts where Region = 'EMEA'
- Definition C: Contacts where Region = 'APAC'

### Performance Tips

| Tip | Benefit |
|-----|---------|
| Fewer fields per Definition | Faster processing |
| Use record filters | Smaller dataset to scan |
| Run HIGH-cost capabilities separately | Better progress visibility |
| Schedule for off-peak | Less competition for resources |

## Scan Completion

### Completion Notifications

When a scan finishes, you receive:

1. **In-app notification** - Bell icon shows new results
2. **Email notification** - Summary sent to your email
3. **Home screen update** - Status changes to Completed

### Viewing Results

Click on a completed scan to see:
- Overall quality score
- Dimension-level scores
- Metric details
- Drill-down to affected records

See [Understanding Results](/resources/using-dqs/understanding-results/) for interpretation guidance.

### Scan History

DQS keeps a history of all scans for each Definition:
- Date and time
- Duration
- Record count
- Overall score
- Comparison to previous scan

Use history to track improvement over time.

## Scheduling Scans

You can schedule recurring scans to automate data quality monitoring.

### Setting Up a Schedule

1. Open your Definition
2. Click **Schedule** (clock icon)
3. Choose frequency:
   - Daily
   - Weekly (select day)
   - Monthly (select date)
4. Set start time
5. Click **Save Schedule**

### Schedule Best Practices

| Frequency | Use Case |
|-----------|----------|
| Daily | High-volume data entry, critical quality monitoring |
| Weekly | Standard quality tracking, trend analysis |
| Monthly | Executive reporting, compliance audits |

> **Tip:** Schedule scans during off-peak hours (early morning or weekends) to minimize impact on users.

### Managing Schedules

From the Definition detail page:
- **Edit** - Change frequency or time
- **Pause** - Temporarily stop without deleting
- **Resume** - Restart a paused schedule
- **Delete** - Remove schedule entirely

### Schedule Limits

Scheduled scans are available for all users with no cap on the number of schedules you can set up.

## Canceling a Scan

### How to Cancel

1. Find the running scan on the home screen
2. Click the stop icon (or **Cancel**)
3. Confirm cancellation

### What Happens When Canceled

- Processing stops after the current batch
- Partial results are saved
- Status changes to "Canceled"
- You can view partial data collected

Canceled scans do not count against limits.

## Troubleshooting

### "Scan queued but not starting"

**Cause:** Other batch jobs in your org are running.

**Solution:** Wait for other jobs to complete. Salesforce allows 5 concurrent batch jobs maximum.

**Check:** Setup > Apex Jobs to see what's running.

### "Scan failed"

**Cause:** Usually a data issue or permission problem.

**Solution:**
1. Check the error message in scan details
2. Verify you have access to the object and fields
3. Review any filter conditions for errors
4. Try running with fewer records

### "Scan taking too long"

**Cause:** Large dataset or HIGH-cost capabilities.

**Solution:**
1. Let it complete (it will finish eventually)
2. Add filters to reduce record count
3. Remove HIGH-cost capabilities
4. Schedule for off-peak hours

### "Results don't show all records"

**Cause:** Filter conditions excluded some records.

**Solution:** Review and adjust your Definition filters.

## Next Steps

- [Understanding Results](/resources/using-dqs/understanding-results/): Interpret your scan data
- [Definition Builder](/resources/using-dqs/definition-builder/): Modify your Definition
