pg gem only for production
add sort-order for plan