Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One supposes horrifically slow might be a bit subjective.

I notice in a VM on my laptop establishing the initial connection to postgres seems to take 2-3ms, and running a trivial query takes 300-1000us.

I routinely involve the database in unit tests, it is certainly slower but my primary concern is the correct behavior of production code which uses real databases.



If testing using the db is slowing you down that means the test has discovered slow code, and worked, not that you should get rid of the test.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: