hello

I don't understand why there's a difference in the execution time of two queries when run separately and together in the same query.

Query A
Code:
SELECT cat_bindings.merchantcategory FROM cat_bindings,categories WHERE cat_bindings.systemcategory = categories.id AND categories.slug = 'slughere';
Takes 0.000 sec. ( according to MySQL Workbench )
this returns a list of category names which are then passed as quoted values in the following query
Query B
Code:
SELECT id FROM products WHERE products.merchantcategory IN ('category name 1','category name 2') AND products.status = 1 ORDER BY RAND() LIMIT 8;
Takes 0.000 sec.

Query C ( same 2 queries run the one inside the other )
Code:
SELECT id FROM products WHERE products.merchantcategory IN (SELECT cat_bindings.merchantcategory FROM cat_bindings,categories WHERE cat_bindings.systemcategory = categories.id AND categories.slug = 'slughere') AND products.status = 1 ORDER BY RAND() LIMIT 8;
I would expect this query to be very fast, since the two queries it's composed by are reported to run in 0.000sec, but this takes 1.6 seconds. Can someone shed some light?