Skip to main content

4 posts tagged with "performance"

View All Tags

Indexes and Query Performance in Babelfish on FoundryDB

· 6 min read
FoundryDB Team
Engineering @ FoundryDB
Babelfish: SQL Server (TDS) over PostgreSQL
DUAL ACCESS TDS :1433 and native PG :5432
SQL Server appTDS:1433 →BabelfishT-SQL → PGPostgreSQL 16:5432
SQL Server app (TDS)Babelfish :1433PostgreSQL 16 engineT-SQL → PG translationnative PG :5432 (dual access)

Babelfish translates T-SQL to PostgreSQL internally. For most index operations and query tuning work, this is transparent: you write the same CREATE INDEX syntax you would use on SQL Server, and Babelfish creates the corresponding PostgreSQL index. Some SQL Server performance tooling does not map cleanly to the PostgreSQL layer, and it is useful to know where the boundaries are before you start profiling.

This post documents index behaviour and query performance tooling in Babelfish 4.8.0, based on confirmed results from live testing on a FoundryDB staging instance. All results use a 10,000-row table tested against PostgreSQL 16.11.

OpenSearch Performance Tuning: Refresh Intervals, Bulk Sizing, and Shard Analysis

· 6 min read
FoundryDB Team
Engineering @ FoundryDB

Getting good write throughput from OpenSearch requires understanding three things: the refresh cycle, translog durability, and shard sizing. This post benchmarks bulk indexing with default and tuned settings on a live OpenSearch 2.19.1 cluster managed by FoundryDB. The cluster is a single-node tier-2 (2 CPU, 4 GB RAM), which is the smallest configuration available. Numbers from larger nodes will be better, but the ratios between default and tuned settings hold.

All commands use YOUR_OPENSEARCH_HOST and YOUR_PASSWORD as placeholders.

OpenSearch cluster, query fan-out & gather
Cluster green · search fans out to one copy per shard, then gathers
Coordinatorfan-out / gatherquery →Data nodesP0 P1 P2 · R0 R1 R2⇠ hitsCluster-managershard allocation
Cluster-managerCoordinatorData nodePrimary shardReplica shardcluster state / gather (dashed)

Connection Pooling on FoundryDB: PgBouncer and ProxySQL Deep Dive

· 6 min read
FoundryDB Team
Engineering @ FoundryDB

Every database connection costs memory. PostgreSQL forks a backend process per connection (roughly 5-10 MB each), and MySQL allocates per-thread buffers that scale with your buffer configuration. At 200 concurrent connections, the overhead is manageable. At 2,000, you are spending gigabytes of RAM on connection state instead of query execution.

Connection pooling sits between your application and the database, multiplexing many client connections over a small number of backend connections. FoundryDB provides PgBouncer for PostgreSQL and ProxySQL for MySQL, both managed through the API with no manual SSH or config file editing required.

Connection string anatomy · TLS required
PostgreSQL · string assembled · TLS connect
postgresql://schemeUSER:PASScredentials@HOSThost:5432port/defaultdbdatabase?sslmode=verify-fullTLS required
schemeuser · passwordhostportdatabaseTLS / sslmode (required)

Predictive Autoscaling: Scale Your Database Before Demand Spikes

· 7 min read
FoundryDB Team
Engineering @ FoundryDB

Reactive autoscaling has a fundamental problem: it waits for something to go wrong. Your database hits 95% CPU, the autoscaler wakes up, requests a resize, and for the next few minutes your application eats latency while the new resources come online. If your traffic is predictable (and most production traffic is), this delay is avoidable.

FoundryDB's predictive autoscaling engine learns your workload's seasonal patterns and scales your database before demand spikes arrive. It combines real-time metric thresholds with historical baselines, anomaly detection, and configurable cost limits so you stay fast without overspending.

Vertical scaling: hot vs cold resize · online storage grow
GROW tier-4 · disk grown 200 GB · online
Servicetier-4 · 4 vCPU / 8 GBhot resize →New plan4 vCPU / 8 GBgrow only →Data disk200 GB · online
Service (resizing)New compute planReachable · online growReboot blip (cold)Data diskmounted volume (dashed)