Skip to content

Instantly share code, notes, and snippets.

@nikmartin
nikmartin / README.md
Last active May 6, 2024 08:56
High Performance Batched updates in Firestore

Batched updates in Firestore

This short script shows how to do a batched update of a very large data set in firestore.

The scenario is I have a large set of products, and a 'pool' of product codes that need to be assigned to them. This script loads the list of UPC codes from a firebase database, then updates a firestore collection, updating every doc with a UPC code. For each product, the next code docID is assigned (so it's reall a pointer to the code, not the code itself), then the code is updated to signify that is has been assigned.

@hacfi
hacfi / my.cnf
Created February 16, 2013 21:12
my.cnf for mysql/percona on os x installed with brew
[mysql]
port = 3306
socket = /usr/local/var/run/mysql.sock
[mysqld]
#user = mysql
default_storage_engine = InnoDB
socket = /usr/local/var/run/mysql.sock
pid_file = /usr/local/var/run/mysql.pid