2

Our main store has never been indexed and thus we cannot run any reports. The stupid contractor that set this thing up was totally incompetent and did things like modify core files and didn't setup the indexing for the site so that reports could be run.

I have a staging site that is setup exactly like it, can I copy my production data to it and then run my reindex on it and then copy the DB to my production site?

1 Answer 1

1

First, I'd recommend auditing the codebase and move all the 'hacks' out of core, you'll save yourself headaches when it comes time to upgrade Magento. With that out of the way...

As for the indexing, I'm assuming you're referring to the "Refresh statistics" option under Reports?

Copying data down and back up can be more chaotic than anticipated with Magento, especially with EAV in the mix. Your better options would be to make sure the store is running at its best so it can do its job, and execute a full log cleaning and reindexing after off peak times. Note, If you have 100s of thousands of records (products,sales,customers,etc.) and are having server timeouts, you'll have to fine tune the server or look into more heavy hardware.

A few scripts exist to clean out all the residual data you may have accumulated, however you can find a list of tables most will simply empty or truncate out.

See: Which database tables can be completely rebuilt via Magento's Reindex All command?

Make sure the cron task has been setup and running properly. Aoe_Scheduler does a good job of this from the an admin point of view.

Most statistical tables for reports are updated via crontab jobs, so it would be ideal to make sure the cron is running properly.

There is an option to index and clean out the logs via Command Line (CLI), it does a much better job of returning exceptions or errors you may not see when indexing via the admin.

To view status, reindex or list indexes:

php -f shell/indexer.php

To clean log tables and view table sizes:

php -f shell/logs.php

See the help for each to see what options are available.

You'll also want to review the configuration settings, particularly Advanced > System.

7
  • Yes, I just realized it was the statistics that was needing to be done. I am aware that it will severely affect the performance, that is why I was asking about doing it on a clone. Our system has 85000 records in sales_order and 3.2mil records in sales_order_decimal. Plus, we have over 70000 customer records.
    – MB34
    Dec 22, 2014 at 19:12
  • It didn't take long for it to run on my clone DB, maybe about 3 min.
    – MB34
    Dec 22, 2014 at 19:15
  • With that number of records I'd look to 3rd party alternatives for Reporting. Magento does E-Commerce well but is very lacking in sophisticated reporting. It also helps lift the burden off Magento trying to be used as a data warehouse instead of transactional.
    – B00MER
    Dec 22, 2014 at 19:32
  • Do they use the Magento statistics or query them their selves?
    – MB34
    Dec 22, 2014 at 19:56
  • Usually 3rd party calls like Google analytics. Unless you want to site your own data, and use something like Amazon's redshift. Segment is something else to consider. segment.com/integrations
    – B00MER
    Dec 22, 2014 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.