Guest User

Untitled

a guest
May 23rd, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. >> Product.second_chance_in_non_tanga.map(&:id)
  2. SQL (1.2ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 8) ORDER BY start_sale_date desc LIMIT 1
  3. SQL (0.7ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 5) ORDER BY start_sale_date desc LIMIT 1
  4. SQL (0.5ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 9) ORDER BY start_sale_date desc LIMIT 1
  5. SQL (0.3ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 14) ORDER BY start_sale_date desc LIMIT 1
  6. SQL (0.3ms) SELECT id FROM "products" WHERE (start_sale_date < now() and category_id = 10) ORDER BY start_sale_date desc LIMIT 1
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. => [38, 35, 34]
  13.  
  14. >> Product.recent_first.second_chance_offer.past_in_non_tanga.map(&:id)
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. => [34]
Add Comment
Please, Sign In to add comment