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

you can tell a 4 digit zip code has a leading zero that was removed though. you'll also get faster sql queries if you search for zip codes as int vs string


you can tell a 4 digit zip code has a leading zero that was removed though

Only if you're 100% sure your date is completely clean. Only very rarely is this the case, especially with ZIP Codes because the data almost always traces back to human input.

The initial query may be quicker, but then you have to compensate for the missing digits elsewhere, likely multiple times. You have to consider the expense to the whole system, not just to one query.




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

Search: