×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Roman Ignatov
Added: Nov 22, 2016 4:23 PM
Views: 23
Tags: magento
  1. SELECT
  2.   p.process_id,
  3.   p.indexer_code,
  4.   p.status,
  5.   COUNT(*) AS cnt
  6. FROM index_process_event AS pe LEFT JOIN index_process AS p ON p.process_id = pe.process_id
  7. GROUP BY p.indexer_code, p.status
  8. ORDER BY cnt DESC;
  9.  
  10.  
  11. SELECT
  12.   TYPE,
  13.   entity,
  14.   COUNT(*) AS cnt
  15. FROM index_event
  16. GROUP BY TYPE, entity
  17. ORDER BY cnt DESC;
  18.  
  19. -- example how to clean queue for full search
  20. DELETE FROM index_process_event WHERE process_id=7; -- 7 from index_process
  21.  
  22. DELETE FROM index_event WHERE TYPE='reindex_fulltext' AND entity='catalog_product';