You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,13 @@ SELECT * FROM adbc_scan(getvariable('conn')::BIGINT, 'SELECT * FROM large_table'
267
267
268
268
### adbc_scan_table
269
269
270
-
Scans an entire table by name and returns all rows. This is a convenience function that generates `SELECT * FROM "table_name"` internally.
270
+
Scans an entire table by name and returns all rows. This function provides advanced optimizations compared to `adbc_scan`:
271
+
272
+
-**Projection pushdown**: Only requested columns are fetched from the remote database
273
+
-**Filter pushdown**: WHERE clauses are pushed to the remote database with parameter binding for SQL injection safety
274
+
-**Cardinality estimation**: Row count statistics are fetched from the driver for query planning
275
+
-**Progress reporting**: Scan progress is reported based on estimated row counts
276
+
-**Column statistics**: Distinct count, null count, and min/max values are provided to the query optimizer (when available from the driver via `AdbcConnectionGetStatistics`)
SELECT name, email FROM adbc_scan_table(getvariable('conn')::BIGINT, 'users')
308
+
WHERE department ='Engineering'AND salary >100000;
309
+
293
310
-- Combine with DuckDB operations
294
311
SELECT department, AVG(salary) as avg_salary
295
312
FROM adbc_scan_table(getvariable('conn')::BIGINT, 'employees')
296
313
GROUP BY department;
297
314
```
298
315
316
+
**Note:** Filter pushdown uses parameterized queries (e.g., `WHERE id = ?`) to prevent SQL injection. Filters that cannot be pushed down are applied locally by DuckDB after fetching the data.
317
+
299
318
### adbc_execute
300
319
301
320
Executes DDL or DML statements (CREATE, INSERT, UPDATE, DELETE).
0 commit comments