Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> Product.second_chance_in_non_tanga.map(&:id)
- SQL (1.2ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 8) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.7ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 5) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.5ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 9) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.3ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 14) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.3ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 10) ORDER BY start_sale_date desc LIMIT 1
- Product Load (0.6ms) SELECT * FROM "products" WHERE (start_sale_date < now() and category_id = 8 and id != E'12') ORDER BY start_sale_date desc
- Product Load (0.6ms) SELECT * FROM "products" WHERE (start_sale_date < now() and category_id = 5 and id != E'21') ORDER BY start_sale_date desc
- Product Load (0.5ms) SELECT * FROM "products" WHERE (start_sale_date < now() and category_id = 9 and id != E'24') ORDER BY start_sale_date desc
- Product Load (0.5ms) SELECT * FROM "products" WHERE (start_sale_date < now() and category_id = 14 and id != NULL) ORDER BY start_sale_date desc
- Product Load (0.5ms) SELECT * FROM "products" WHERE (start_sale_date < now() and category_id = 10 and id != E'14') ORDER BY start_sale_date desc
- => [38, 35, 34]
- >> Product.recent_first.second_chance_offer.past_in_non_tanga.map(&:id)
- SQL (0.6ms) SELECT id FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 8)) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.5ms) SELECT id FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 5)) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.5ms) SELECT id FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 9)) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.5ms) SELECT id FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 14)) ORDER BY start_sale_date desc LIMIT 1
- SQL (0.5ms) SELECT id FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 10)) ORDER BY start_sale_date desc LIMIT 1
- Product Load (1.0ms) SELECT * FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 8 and id != NULL)) ORDER BY start_sale_date desc
- Product Load (4.3ms) SELECT * FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 5 and id != E'38')) ORDER BY start_sale_date desc
- Product Load (1.2ms) SELECT * FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 9 and id != E'35')) ORDER BY start_sale_date desc
- Product Load (0.6ms) SELECT * FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 14 and id != NULL)) ORDER BY start_sale_date desc
- Product Load (0.8ms) SELECT * FROM "products" WHERE (("products"."second_chance_offer" = 't') AND (start_sale_date < now() and category_id = 10 and id != NULL)) ORDER BY start_sale_date desc
- => [34]
Add Comment
Please, Sign In to add comment