fix sql, change test to fit my local database, fixed #46
Merge pull request #50 from fengmk2/issue46-slow-sql

fix sql, change test to fit my local database, fixed #46