Delete Bestsellers & Search Terms Data from Magento Dashboard

Geoff Jackson

Geoff Jackson (more commonly known by his online pseudonym zigojacko) is the founder of Design Haven and The Clubnet Group which hosts numerous agencies including the most widely recognised of them, Clubnet Digital, a full service digital marketing and creative design/development agency. He also has a personal blog but it doesn’t get updated as much as he’d like.

You may also like...

Sponsored Links...

Subscribe to Design Haven UK

Enter your email address to subscribe and receive our new posts by email.

8 Responses

  1. Mario says:

    Hi,

     

    I tried to run the script on CE 1.9.2.4 and it doe snot appear to work. Below is the SQL output:

     

    # Tested on Magento CE 1.4.1.1 - 1.9.1.1

    SET FOREIGN_KEY_CHECKS=0;# MySQL returned an empty result set (i.e. zero rows).

    ##############################
    # SEARCH TERMS RELATED TABLES
    ##############################

    TRUNCATE catalogsearch_query;# MySQL returned an empty result set (i.e. zero rows).

    TRUNCATE catalogsearch_fulltext;# MySQL returned an empty result set (i.e. zero rows).

    TRUNCATE catalogsearch_result;# MySQL returned an empty result set (i.e. zero rows).

    ALTER TABLE catalogsearch_query AUTO_INCREMENT=1;# MySQL returned an empty result set (i.e. zero rows).

    ALTER TABLE catalogsearch_fulltext AUTO_INCREMENT=1;# MySQL returned an empty result set (i.e. zero rows).

    ALTER TABLE catalogsearch_result AUTO_INCREMENT=1;# MySQL returned an empty result set (i.e. zero rows).

    ##############################
    # BESTSELLERS RELATED TABLES
    ##############################
    TRUNCATE TABLE sales_bestsellers_aggregated_daily;# MySQL returned an empty result set (i.e. [...]

     

     

  2. Mario says:

    Lol. I guess it’s better to delete my comment then to try to answer. Good job!

  3. Mario says:

    Hi,

    I’m sorry, on my screen it looked like comment posted (guess I haven’t refreshed).

    Anyways, thank you for getting back to me. The rest of the SQL query result looks pretty much the same. :

    # Tested on Magento CE 1.4.1.1 - 1.9.1.1
    SET FOREIGN_KEY_CHECKS =0;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ##############################
    # SEARCH TERMS RELATED TABLES
    ##############################
    TRUNCATE catalogsearch_query;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    TRUNCATE catalogsearch_fulltext;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    TRUNCATE catalogsearch_result;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE catalogsearch_query AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE catalogsearch_fulltext AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE catalogsearch_result AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ##############################
    # BESTSELLERS RELATED TABLES
    ##############################
    TRUNCATE TABLE sales_bestsellers_aggregated_daily;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    TRUNCATE TABLE sales_bestsellers_aggregated_monthly;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    TRUNCATE TABLE sales_bestsellers_aggregated_yearly;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE sales_bestsellers_aggregated_daily AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE sales_bestsellers_aggregated_monthly AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    ALTER TABLE sales_bestsellers_aggregated_yearly AUTO_INCREMENT =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).
    SET FOREIGN_KEY_CHECKS =1;# MySQL returned an empty result set (i.e. zero rows).
    # MySQL returned an empty result set (i.e. zero rows).# MySQL returned an empty result set (i.e. zero rows).

    • Hey Mario,

      Sorry for delayed reply, this time, your comment got caught up in our spam filter.

      Are you sure you are running the SQL query in the correct database? It returns that there are no rows in the relevant tables (but this is often a false positive in phpMyAdmin).

      If you actually browse any of the tables in the query, can you see any data within them?

  4. Mario says:

    Some of the tables had different pre-fixes. I don’t know if this is 1.9.2.4 or simply my set up. For what it is worth the prefixes were fn_. Maybe it will help someone in the future. Thank you for pointing me in the right direction.

    # Tested on Magento CE 1.4.1.1 – 1.9.1.1

     

    SET FOREIGN_KEY_CHECKS=0;

     

    ##############################

    # SEARCH TERMS RELATED TABLES

    ##############################

     

    TRUNCATE catalogsearch_query;

    TRUNCATE catalogsearch_fulltext;

    TRUNCATE catalogsearch_result;

    ALTER TABLE catalogsearch_query AUTO_INCREMENT=1;

    ALTER TABLE catalogsearch_fulltext AUTO_INCREMENT=1;

    ALTER TABLE catalogsearch_result AUTO_INCREMENT=1;

     

    ##############################

    # BESTSELLERS RELATED TABLES

    ##############################

    TRUNCATE TABLE fn_sales_bestsellers_aggregated_daily;

    TRUNCATE TABLE fn_sales_bestsellers_aggregated_monthly;

    TRUNCATE TABLE fn_sales_bestsellers_aggregated_yearly;

    ALTER TABLE fn_sales_bestsellers_aggregated_daily AUTO_INCREMENT=1;

    ALTER TABLE fn_sales_bestsellers_aggregated_monthly AUTO_INCREMENT=1;

    ALTER TABLE fn_sales_bestsellers_aggregated_yearly AUTO_INCREMENT=1;

     

    SET FOREIGN_KEY_CHECKS=1;

     

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: