add sql compact for testing