optimize the db query for seriesofbrand()