We have a number of test databases that are used for a variety of
purposes. These databases are all duplicates of the drupal.org database
and thus they are huge and eat valueable RAM even if they are actually
not much used. Therefore I propose to prune these test databases in a
meaningful way. Ie they should represent d.o in some way and yet not
have all the content of d.o.

Unfortunatly, we cannot simply drop all old nodes as this would break
for example books.

Does somebody have a better idea for rules on how to drop old stuff?

Comments

killes@www.drop.org’s picture

we could get rid of about 90k nodes and 350k comments if we drop all comments, forum nodes, and project issues that are older than the 1st of last January.

We could also prune the search tables.

Now: Which tables do we need to look at to properly clean up these forum topics and project issues?

forum:
node
node_revisions
forum
term_node
node_comment_statistics
history
search*

project_issues:
node
node_revisions
term_node
node_comment_statistics
history
search*

what else?

dww’s picture

issue meta data lives in in {project_issues}. issue meta data for comment replies lives in {project_issue_comments}.

moshe weitzman’s picture

It will take *much* longer to run, but if you run node_delete($nid) you will be assured that the DB stays perfectly clean, and you don't have to do any research and trial/error testing. So I suggest limiting development time at the expense of script run time.

kbahey’s picture

Thinking a bit out of the box here:

As we refresh these test database from the live database, we have to run the deletes again, and they will take a long time and overload the box.

So, why have the live d.o database being served from the same box and instance as the test databases at all?

If we move those test databases to another little used box, then the memory, CPU and disk load of the live database unaffected by any tests we do ...

damien tournoud’s picture

Assigned: Unassigned » nnewton
Status: Active » Closed (won't fix)

Not an issue anymore.

Component: Database » Servers