Company
Date Published
Author
CARTO Contributors
Word count
799
Language
English
Hacker News points
None

Summary

The CartoDB platform allows users to create maps and build applications on top of dynamic data. The SQL API enables efficient management and analysis of data through a library of PostgreSQL and PostGIS functions, with the most common operations being updates and additions to records in databases. To efficiently batch update or add new records, CartoDB recommends rewriting UPDATE queries to scan the table only once while joining it against the set of new values, reducing table scans from three to one. This optimization can result in significant performance boosts, especially for large datasets. The same method can be applied to INSERT operations and even combined with UPDATEs to perform "upsert" operations, which update existing records and insert new ones with a single table scan.