TOAST: Fast and scalable auto-partitioning based on principled static analysis