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-
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.
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)
Viewing 2 reply threads
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.