Fixed mysql driver insert bottleneck

800x faster word inserts thanks to batched operations and batch rewriting.