From: Eric L. M. <em...@nd...> - 2012-01-23 21:07:07
|
On Jan 20, 2012, at 7:44 AM, Demian Katz wrote: > The search table serves two purposes: > > 1.) It maintains the "search history" that you can view in every session > 2.) It remembers saved searches in user accounts > > As you've noticed, a lot of the search history rows seem to outlive the sessions they're associated with (there's code in VuFind to clean this up, but PHP's garbage collection isn't entirely predictable, so a lot get missed). > > Fortunately, there's a tool you can run regularly (i.e. via cron job) to clean this up -- just look at expire_searches.php in VuFind's util folder. Demian, thank you. I found this table and discovered it contained more than 4,000,000 rows. Ack! When I tried to use expire_searches.php PHP ran out of its allocated RAM. I then reverse engineered expire_searches.php and learned of the two commands I needed to use to clean the table by hand. As I ran the first command my fellow MySQL users started complaining about slow performance. Ack, again! I will run the command again, this evening, before I go home, and if that doesn't work by tomorrow morning, then I will simply purge the table. Obviously I needed to run expire_searches.php as a cron job much sooner. -- Eric Lease Morgan |