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
Vectors are inserted via JDBC PreparedStatements and can be efficiently stored
136
+
and retrieved using the FoundationDB backend.
137
+
138
+
### Index-Backed Query Execution
139
+
140
+
FRL's query planner intelligently selects indexes to execute
141
+
queries efficiently:
142
+
143
+
```sql
144
+
-- Queries use indexes automatically
145
+
SELECT name FROM customers WHERE email ='alice@example.com';
146
+
-- Uses email_idx if available
147
+
148
+
-- JOINs using comma-separated FROM clause
149
+
SELECTc.name, o.order_id
150
+
FROM customers c, orders o
151
+
WHEREc.customer_id=o.customer_id;
152
+
153
+
-- Aggregations backed by indexes
154
+
SELECT category, COUNT(*)
155
+
FROM products
156
+
GROUP BY category;
157
+
-- Requires ordered index or primary key on category for streaming aggregate, or a aggregate index for direct retrieval
158
+
159
+
-- ORDER BY requires index or primary key order
160
+
SELECT*FROM customers ORDER BY email;
161
+
-- Requires index on email (like email_idx above)
162
+
```
163
+
164
+
**Important**: FRL does not perform in-memory sorting or aggregation. Operations like ORDER BY, GROUP BY,
165
+
and aggregates require underlying indexes to provide the required ordering.
166
+
167
+
## Architecture Notes
168
+
169
+
FRL is designed for:
170
+
***Horizontal scalability** - Thousands of independent database instances
171
+
***Low latency** - Millisecond-level initialization and query execution
172
+
***Stateless services** - No server-side state; all data in FoundationDB
173
+
***Schema evolution** - Templates can evolve over time (template evolution features
174
+
coming to relational layer; currently available via advanced Record Layer API)
175
+
176
+
## Advanced: Direct Record Layer API
177
+
178
+
For applications requiring fine-grained control over storage layout, index
179
+
maintenance, or features not yet available in the SQL Relational layer, the Record Layer
180
+
provides a low-level Java API using Protocol Buffers.
181
+
182
+
**Note**: This API is maintained for advanced use cases but is being positioned
183
+
as a lower-level alternative to the SQL interface. Features available only
184
+
through this API will migrate to the SQL layer over time. Long-term support of this lower-level API is not guaranteed once equivalent features are available at the Relational Layer.
185
+
186
+
Key Record Layer API features:
187
+
***Protobuf-based schema definition** - Define records using `.proto` files
188
+
***Programmatic index management** - `IndexMaintainer` extension points
189
+
***Custom query components** - Extend the query planner
190
+
***Schema evolution** - `MetaDataEvolutionValidator` for safe schema changes
191
+
***Low-level control** - Direct access to FoundationDB operations
192
+
193
+
See [Record Layer Documentation](https://foundationdb.github.io/fdb-record-layer/Overview.html) for details.
0 commit comments