Database:0,794 (158) Solr: 0,769 Other: 0,28 Total: 1,843

-- Query took 0,008sec
SELECT num FROM stats_queriesSearchedFlat JOIN stats_queries ON (stats_queries.id = stats_queriesSearchedFlat.queryID) WHERE query = 'contactslot-verwijderen-opel-zafira'

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (159398)

-- Query took 0,032sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT[KEY], RANK AS ranking
						FROM FREETEXTTABLE (prices_shopProducts, name, 'contactslot AND verwijderen AND opel AND zafira', 5000)
			SELECT TOP 10
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,002sec
SELECT html FROM htmlCache WHERE id = '58352d573916e3119fd11a3c5a7a7331' AND timestamp > '2014-10-20 14:01:58' AND  [group] = 'global'

-- Query took 0,005sec
SELECT num FROM stats_queriesSearchedFlat JOIN stats_queries ON (stats_queries.id = stats_queriesSearchedFlat.queryID) WHERE query = 'contactslot verwijderen opel zafira'

-- Query took 0,001sec
SELECT * FROM categories WHERE internalKey = 'auto'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'g_bestelwagen'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'g_stadscombi'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_cabrio'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_coupe'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_hatchback'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_mpv'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_sedan'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'g_spacewagon'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'dealers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'navigatielos'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,001sec
SELECT * FROM categories WHERE internalKey = 'hardware'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'desktopcomputers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'netbooks'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'laptops'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'servers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'tablets'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'laserprinters'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'beamers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'fotocameras'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'videocameras'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,001sec
SELECT * FROM categories WHERE internalKey = 'kantoor'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'airco'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 3

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'shredders'

-- Query took 0,002sec
SELECT * FROM subCategories WHERE internalKey = 'waterkoelers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 3

-- Query took 0,001sec
SELECT * FROM categories WHERE internalKey = 'telecom'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'mobieletelefoons'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 4

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'smartphones'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 4

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'telefoons'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 4

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'internettoegang'

-- Query took 0,001sec
SELECT num FROM stats_queriesSearchedFlat JOIN stats_queries ON (stats_queries.id = stats_queriesSearchedFlat.queryID) WHERE query = 'contactslot verwijderen opel zafira'

-- Query took 0,115sec
SELECT TOP 10  query, num FROM stats_queriesSearchedFlat, stats_queries WHERE stats_queries.id = stats_queriesSearchedFlat.queryID AND site = 1 AND subCategoryID = 0 ORDER BY num DESC

-- Query took 0,042sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,002sec
SELECT * FROM subCategories WHERE id = 111

-- Query took 0,041sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,041sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,04sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,04sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,04sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,04sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,041sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 183 AND products.externSource = 'shops'

-- Query took 0,041sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 247 AND products.externSource = 'shops'

-- Query took 0,041sec
SELECT products.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource, products_rate AS rate, products_stats AS stats FROM products LEFT JOIN brands ON (products.brandID = brands.id) LEFT JOIN productsSearch ON (products_id = products.id) WHERE products.externID = 247 AND products.externSource = 'shops'

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'laptops'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 8
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (319089,258149,292041,137517)

-- Query took 0,006sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (954608,945553,952222,770275,982187,982444,803796,818779,863214,322982,325373,325375)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (954608,945553,952222,770275,982187,982444,803796,818779,863214,322982,325373,325375)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 8 AND site = 1)
		 WHERE brands.id IN (10167,10181,10222,10359,10500,11464,11717,11956,12029,12230,12277,12411,12541,13034,13720,13753,9339,9431,9539,9587,9790)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'desktopcomputers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 7
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (348476,135011,136540,137185)

-- Query took 0,005sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (944646,944651,947990,224535,228722,228723,410769,410778,410804,253077,253078,253303)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (944646,944651,947990,224535,228722,228723,410769,410778,410804,253077,253078,253303)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 7 AND site = 1)
		 WHERE brands.id IN (10222,10500,10797,11176,11464,11717,11937,11956,12029,12076,12277,12411,13028,13034,13720,13753,9339,9431,9539,9587,9790)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'laserprinters'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 14
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (135173,179631,137118,138584)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (252310,252331,252333,383938,393582,393798,351000,351855,352370,404921,404923,404927)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (252310,252331,252333,383938,393582,393798,351000,351855,352370,404921,404923,404927)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 14 AND site = 1)
		 WHERE brands.id IN (10197,10500,10645,10958,11128,11633,12232,12910,13059,13087,13342,13720,9431,9478,9539,9790,9871)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'tablets'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 12
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (359627,243567,266645,160152)

-- Query took 0,005sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (987762,987763,987764,671939,671940,671941,740050,740053,740851,430653,430655,430656)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (987762,987763,987764,671939,671940,671941,740050,740053,740851,430653,430655,430656)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 12 AND site = 1)
		 WHERE brands.id IN (10167,10181,10222,10500,10897,11201,11367,11643,11647,12029,12076,12140,12277,12411,12689,13034,13321,13508,13720,13753,14489,9339,9431,9539,9587,9790,9969)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'koffiezetapparaat'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 3

-- Query took 0,003sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 94
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (189105,188951,188969,189722)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (564224,564070,564088,564841)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (564224,564070,564088,564841)

-- Query took 0,004sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 94 AND site = 1)
		 WHERE brands.id IN (10007,10054,10056,10105,10115,10120,10167,10316,10382,10397,10425,10448,10460,10492,10497,10632,10666,10712,10776,10818,10878,10923,10936,10988,11046,11115,11132,11182,11200,11202,11208,11234,11303,11315,11390,11393,11466,11552,11739,11766,11830,11920,12054,12076,12141,12215,12242,12256,12465,12526,12549,12550,12585,12619,12671,12681,12686,12815,12842,12929,12982,13073,13166,13258,13391,13411,13705,13708,13809,13836,13918,13961,14010,14034,14057,14267,14293,14334,14392,14458,14591,14668,14681,14691,14702,14761,14763,14773,14819,14999,15086,15091,15318,15333,15730,15903,15905,15969,16080,16089)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'vaatwassers'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 3

-- Query took 0,004sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 113
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (267083,351681,323719,323710)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (744278,956705,860530,860521)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (744278,956705,860530,860521)

-- Query took 0,004sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 113 AND site = 1)
		 WHERE brands.id IN (10054,10115,10181,10311,10316,10425,10533,10676,10923,10936,10946,10988,11182,11188,11315,11390,11447,11466,11766,11977,12020,12054,12215,12430,12465,12533,12541,12549,12647,12686,12751,12815,12982,13067,13073,13132,13156,13166,13258,13400,13411,13759,13836,13918,14010,14057,14061,14265,14322,14547,14650,14668,14745,14943,14969,14999,15275,16283,16536,16758,16969,17050,17307,17404,17511,17533,17652,17821,18548,19104,19169,19431,19497,19531,19536,9520,9539,9625,9892)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'fotocameras'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 2

-- Query took 0,004sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 21
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (166380,147175,147839,200592)

-- Query took 0,005sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (505990,506736,506737,246279,249366,250272,250273,248318,250080,582804,582805)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (505990,506736,506737,246279,249366,250272,250273,248318,250080,582804,582805)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 21 AND site = 1)
		 WHERE brands.id IN (10167,10220,10645,11237,11340,11550,11705,11956,12029,12076,12232,12277,12797,13034,13059,13342,13645,13967,16369,9431,9539,9694,9697,9731,9790)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'smartphones'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 4

-- Query took 0,006sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 109
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (343611,362025,262392,250974)

-- Query took 0,005sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (908143,908688,909201,992088,992089,992090,727020,879425,879426,895498,755764,890317)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (908143,908688,909201,992088,992089,992090,727020,879425,879426,895498,755764,890317)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 109 AND site = 1)
		 WHERE brands.id IN (10181,10222,10897,10910,11647,11956,12005,12029,12076,12140,12177,12257,12411,12689,13034,13049,13508,13720,9339,9420,9431,9539,9557,9790,9908,9969)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_4x4'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,004sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 83
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (291652,72068,160552,72091)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (865552,803210,865556,507123,552113,877338,497618,802007,497620,224490,503718,749776)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (865552,803210,865556,507123,552113,877338,497618,802007,497620,224490,503718,749776)

-- Query took 0,002sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 83 AND site = 1)
		 WHERE brands.id IN (14109,14112,9232,9233,9234,9236,9237,9239,9240,9241,9242,9244,9245,9247,9248,9249,9250,9251,9252,9253,9254,9255,9256,9257,9259,9260,9261,9262,9263,9264,9268,9275,9285,9293,9294,9295)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_mpv'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,004sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 87
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,002sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (72212,72347,340465,72014)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (223318,231931,467000,221597,224797,468000,907082,907090,907083,233629,553415,237688)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (223318,231931,467000,221597,224797,468000,907082,907090,907083,233629,553415,237688)

-- Query took 0,003sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 87 AND site = 1)
		 WHERE brands.id IN (14109,14112,9234,9235,9236,9237,9239,9240,9242,9246,9249,9250,9251,9252,9253,9254,9256,9258,9259,9261,9262,9263,9268,9294,9295)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_coupe'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 85
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (72061,345649,139633,71792)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (232417,749707,469147,928235,938630,928236,438158,783990,230921,230630)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (232417,749707,469147,928235,938630,928236,438158,783990,230921,230630)

-- Query took 0,003sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 85 AND site = 1)
		 WHERE brands.id IN (14105,14110,14113,9231,9232,9233,9234,9235,9236,9238,9241,9242,9243,9249,9250,9252,9254,9255,9256,9260,9262,9265,9266,9267,9269,9271,9274,9275,9279,9280,9281,9284,9287,9288,9291,9293,9295)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name

-- Query took 0,001sec
SELECT * FROM subCategories WHERE internalKey = 'y_cabrio'

-- Query took 0,001sec
SELECT * FROM categories WHERE id = 1

-- Query took 0,005sec
SELECT
				categoryFeature.*,
				features.id AS feature_id,
				features.externID AS feature_externID,
				measures.id AS measureid,
				featureGroupLang.name AS featureGroup_name,
				featureGroups.id AS featureGroup_id,
				featureGroups.externid AS featureGroup_externid,
				featureGroups.externsource AS featureGroup_externsource,
				featureGroups.priority AS featureGroup_priority,
				featureLang.name,
				featureLang.description,
				measures.defaultSign AS measure_defaultSign,
				measureLang.name AS measure_name,
				measureLang.description AS measure_description,
				measureLang.sign AS measure_sign
			FROM categoryFeature
				LEFT JOIN features ON features.id = categoryFeature.featureID
				LEFT JOIN measures ON features.measureID = measures.id
				LEFT JOIN featureGroups ON featureGroups.id = categoryFeature.featureGroupID
				LEFT JOIN featureGroupLang ON featureGroups.id = featureGroupLang.featureGroupID
				LEFT JOIN featureLang ON features.id = featureLang.featureID AND featureLang.lang = 'NL'
				LEFT JOIN measureLang ON measures.id = measureLang.measureID AND measureLang.lang = 'NL'
			WHERE
				categoryFeature.subCategoryID = 84
			 AND searchable = "1"
			ORDER BY
				featureGroups.priority DESC, priority DESC, featureLang.name
			

-- Query took 0,001sec
SELECT productsSearch.* FROM productsSearch WHERE products_id IN (72197,72045,72341,149354)

-- Query took 0,004sec
DECLARE @sr TABLE (id int, ranking int)
INSERT INTO @sr
					SELECT id, 1 AS ranking
						FROM prices_shopProducts WHERE productVersionID IN (497308,556204,225497,466185,466182,594349,793466,906287,916264,552200,462668,462671)
			SELECT TOP 100
				prices_shopProducts.*,
				prices_shops.id AS shops_id,
				prices_shops.name AS shops_name,
				prices_shops.url AS shops_url,
				prices_shops.address AS shops_address,
				prices_shops.postcode AS shops_postcode,
				prices_shops.city AS shops_city ,
				prices_shops.phone AS shops_phone,
				prices_shops.email AS shops_email,
				prices_shops.description AS shops_description,
				prices_shops.invoiceCompany AS shops_invoiceCompany,
				prices_shops.invoiceName AS shops_invoiceName,
				prices_shops.invoiceAddress AS shops_invoiceAddress,
				prices_shops.invoicePostcode AS shops_invoicePostcode,
				prices_shops.invoiceCity AS shops_invoiceCity,
				prices_shops.invoiceTel AS shops_invoiceTel,
				prices_shops.invoiceEmail AS shops_invoiceEmail,
				prices_shops.dateAdded AS shops_dateAdded,
				prices_shops.logo AS shops_logo,
				prices_shops.state AS shops_state,
				prices_shops.cost AS shops_cost,
				prices_shops.logoimageid as shops_logoimageid,
				prices_shops.keurmerken as shops_keurmerken,
				prices_shops.availabilityType as shops_availabilityType


			FROM @sr AS result JOIN prices_shopProducts ON (prices_shopProducts.id = result.id)
			JOIN prices_shops ON (prices_shops.id = prices_shopProducts.shopID) WHERE 1=1 AND prices_shops.state & 2 != 2 ORDER BY CASE WHEN prices_shopProducts.productVersionID IS NULL THEN 1 ELSE 0 END, result.ranking DESC, name, priceIn

-- Query took 0,001sec
SELECT productVersions.*, brands.name AS brand_name, brands.logo AS brand_logo, brands.externID AS brand_externID, brands.externSource AS brand_externSource  FROM ProductVersions LEFT JOIN brands ON (productVersions.brandID = brands.id) WHERE productVersions.id IN (497308,556204,225497,466185,466182,594349,793466,906287,916264,552200,462668,462671)

-- Query took 0,003sec
SELECT
			brands.id, stats_brandViews.products AS sum, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.views AS views
		FROM brands
		LEFT JOIN
			stats_brandViews ON (brands.id = stats_brandViews.brandID AND stats_brandViews.subCategoryID = 84 AND site = 1)
		 WHERE brands.id IN (14106,14107,14113,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9243,9246,9248,9249,9250,9251,9252,9253,9254,9255,9256,9257,9263,9264,9265,9266,9267,9269,9270,9273,9274,9275,9276,9277,9279,9280,9281,9282,9283,9284,9286,9287,9288,9289,9292,9293,9295)
		GROUP BY
			brands.id, brands.name, brands.logo, brands.externID, brands.externSource, stats_brandViews.products, stats_brandViews.views
		ORDER BY
			views DESC, sum DESC, name