Sample Header Ad - 728x90

Struggling to design addresses table for fast querying

0 votes
1 answer
102 views
I have two tables: addresses and locations. Locations zipcode city county state Addresses line1 line2 city county state zipcode Posts Id Address_id Body All my users are required to provide at least a personal address and some need to provide the business address. My users can create two types of posts: first requires to have a full address and the second requires just the location (state, city, zipcode). Now, the issue comes because I need to allow searches for posts based on location. The search is always based on city state and zipcode (not street numbers). Does it make sense to place all the addresses inside the Addresses table and for the posts that need just the state, city and zipcode to leave the other fields blank? Would this slow down posts searches based on addresses? Would having in my DB 5.000-10.000 users and maybe 200.000 addresses really slow down the process of searching for first type of posts based on the address?
Asked by Cristian (203 rep)
Dec 15, 2015, 03:29 PM
Last activity: Mar 2, 2017, 04:02 AM