Skip to main content

Scan

Scanning is always explicit via .scan(). Queries never silently become scans.

Basic Scan

# Scan entire table
all_items = orders.scan()

Scan with Filter

# Scan with filter
pending = orders.scan().filter(status__eq="PENDING").limit(50)

Scan with Projection

# Scan with projection
ids_only = orders.scan().select("user_id", "order_id")
Performance Note

Scan operations read the entire table and should be used sparingly. Consider using queries with GSIs for better performance.