Out of memory mysql pg dating