SELECT retrieves specific rows and columns from ParadeDB tables, optionally filtering, sorting, joining, and aggregating results.
SELECT lets you read data from ParadeDB tables. You can list columns, filter rows, join tables, aggregate values, and limit or order the result set—all in one declarative command.
Start with SELECT column_list FROM table_name;. Use * to return every column, but list only needed columns for performance and clarity.
Add WHERE conditions after FROM. ParadeDB pushes filters early, so precise predicates reduce scanned rows and save compute.
Use INNER JOIN, LEFT JOIN, or other joins to combine tables on related keys. ParadeDB’s optimizer picks efficient join plans when keys are indexed.
Combine GROUP BY with aggregate functions such as COUNT(), SUM(), AVG(). Use HAVING to filter the aggregated result.
ORDER BY sorts the output. LIMIT and OFFSET paginate results, ideal for API endpoints or UIs that load results incrementally.
Project only required columns, use explicit joins with clear aliases, filter early, index frequently-filtered columns, and avoid SELECT * in production queries.
Use DISTINCT to remove duplicates only when necessary; it forces an extra sort/aggregate step. Consider GROUP BY instead when also computing aggregates.
Yes. ParadeDB is PostgreSQL-compatible, so all standard SELECT clauses work the same.
ParadeDB extends SELECT with vector and full-text operators; simply include them in the WHERE clause.
Prefix the statement with EXPLAIN (ANALYZE, BUFFERS) to view the query plan and spot sequential scans or mis-used indexes.