views:

50

answers:

1

hello all, i am building an application that will behave more or less like google adwords and i am at the point where i build the impression engine. we will have campaigns running based on geolocation of the user. based on his IP we will determine his state, city, approximate lat/long. on the other side we will have ads running on different scopes: country wide, state wide, city specific.

i will obviously have a cache table of all active ads/campaigns, their scope (city_id, state_id). instead of running a SQL query with an OR to check for eligible ads to be displayed for this user i could combine my city_id and state_id into one field, hash it and index it. this way i can do a single index see and be done with it. keep in mind that the system potentially will have to support a load of million queries per hour against this index, so performance is the key.

is it a good solution for my scenario? would you recommend something else?

thanks!

A: 

not sure if this will bump this question...

busyone