As Bulletin boards the request, determining whether the bookmarked ad from the user or not?
Hello. Here in message boards, you can choose for example ads some categories for the entire period for example, and there are of course hundreds of thousands and even millions of ads. Probably first loaded units thousand, and only then if necessary the rest. But even if you first loaded a few thousand, each needed to determine whether this is the ad the user has bookmarked or not to tint star/heart(a sign of being in the bookmarks/favorites). Question actually in how they do it? The obvious solution is when the selected ad joined table polzovatelyami, but for such volumes of data, how so quickly return a result? this is one request to table declarations, one request to table polzovatelyami to cut off the user, and then join two results. In General there is a feeling that everything is much easier and cooler, so if anyone knows please share the info, I'd appreciate it)