# django.db.utils.OperationalError: query timeout expired

- **ID:** `python/django-orm-query-timeout`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

数据库查询执行时间超过配置的超时限制

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Article.objects.select_related('author').filter(...)
   ```
2. **** (85% success)
   ```
   在模型字段上添加db_index=True
   ```

## Dead Ends

- **** — 可能掩盖性能问题，且数据库可能无法支持更长超时 (60% fail)
- **** — 查询结果不完整，功能失效 (90% fail)
