Large Data Performance Demo Endpoints (Data from large data set on SQL DB)

API endpoints designed to demonstrate large dataset efficiency. **Responses are displayed below.**

API Endpoint: `GET /api/Products`

What it Demos: Standard Paging & Metrics

Shows traditional pagination (Skip/Take) to retrieve a small subset of a large table efficiently.

Why it's Special: Includes server-side execution time in the response payload. (Hover for details)

Test Default (Page 1, Size 50)
API Endpoint: `GET /api/Products/chunked`

What it Demos: Efficient Chunking/Streaming

Retrieves all data in small, memory-safe chunks, avoiding huge memory consumption on the server.

Why it's Special: Ideal for processing large datasets in the background. (Hover for details)

Test Chunked (Size 1000)
API Endpoint: `GET /api/Products/stats`

What it Demos: Database Aggregation

Offloads complex calculations like COUNT and SUM directly to the SQL database engine.

Why it's Special: Performs lightning-fast aggregations on huge tables. (Hover for details)

Test Stats
API Endpoint: `POST /api/Products/bulk-insert`

What it Demos: High-Speed Bulk Data Insertion

A non-transactional action using specialized libraries for the fastest way to insert synthetic data.

Why it's Special: Highlights the massive performance gain of batch insert libraries. (Hover for details)

API Response Status: Pending
Click an endpoint button above to see the JSON response here...
Why Response Times Fluctuate

You'll see execution time change every click. This is normal and due to internal optimizations:

Scenario Typical Time Reason (The "Why")
First Click Slowest Database Cold Start: Database reads data from slow disk into fast memory cache.
Second/Later Clicks Faster & Consistent Database Warm Cache: Data is in RAM and the query plan is pre-compiled.
Occasional Spikes Slower Server running background tasks like Garbage Collection (memory cleanup).

The most reliable performance metric is usually the time recorded after the first "warm-up" click.