From 94578cb6a7e91cb4ca741a8f437636d264b56322 Mon Sep 17 00:00:00 2001 From: Francesco Riosa Date: Fri, 7 Oct 2016 18:16:26 +0200 Subject: [PATCH] reduce chunk size for countries table (#1279) One user reported the load of the "countries" table exceed max_allowed_packet which in some configurations can be as low as 1MB. Changing the chunk size from 500 to 50 has a small cost on the initial load of the data (one additional second to the 17 taken previously) while being more universally usable without changing the configuration of the mysql server. The new packet size is estimated to be about 500KB. The committer has not checked other tables --- caravel/data/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caravel/data/__init__.py b/caravel/data/__init__.py index 377661bcb1..974ce2e898 100644 --- a/caravel/data/__init__.py +++ b/caravel/data/__init__.py @@ -178,7 +178,7 @@ def load_world_bank_health_n_pop(): tbl_name, db.engine, if_exists='replace', - chunksize=500, + chunksize=50, dtype={ 'year': DateTime(), 'country_code': String(3),