Support

Home Forums Event Espresso Premium Large Database issues

Large Database issues

Posted: September 13, 2013 at 1:57 pm


Troy

September 13, 2013 at 1:57 pm

I have a large database that is experiencing issues in load time. Currently I have about 20,000 attendees. Most of that data is old data and no longer needed. Can I simply go into phpmyadmin and load data table and delete line by line old data paying attention to smaller id #s? And if so, are these tables ok to do such purge-

wp_events_attendee_meta
wp_events_attendee
wp_events_answer

Are there others that would make sense to clean some?

Sidney suggested I do an sql query but I don’t know how to write one. Any help would be great! Thanks!


Sidney Harrell

September 13, 2013 at 3:43 pm

I just tested this out:
DELETE a FROM wp_events_attendee a
WHERE NOT EXISTS(SELECT NULL
FROM wp_events_detail d
WHERE d.id = a.event_id)
and it looks like it works.


Sidney Harrell

September 13, 2013 at 3:56 pm

Some of your events may be statused ‘Deleted’, but may still be in the DB. To clean those out first, you can run:
DELETE FROM wp_events_detail WHERE event_status=’D’
You would want to run that first, then clean the attendee table with
DELETE a FROM wp_events_attendee a
WHERE NOT EXISTS(SELECT NULL
FROM wp_events_detail d
WHERE d.id = a.event_id)
then clean out the attendee_meta table:
DELETE am FROM wp_events_attendee_meta am
WHERE NOT EXISTS(SELECT NULL
FROM wp_events_attendee a
WHERE a.id = am.attendee_id)
then the answers table:
DELETE an FROM wp_events_answer an
WHERE NOT EXISTS(SELECT NULL
FROM wp_events_attendee a
WHERE a.id = an.attendee_id)

The support post ‘Large Database issues’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Sidney Harrell 6 years, 1 month ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!