Good luck! If you want, you might be able to get the PHP script to run by adding a line like this at the top:
ini_set('memory_limit','256M');
(obviously, it might take some trial and error to figure out exactly how much memory you actually need).
Also, if you do end up doing a purge, at least try to avoid deleting rows where saved=1 in order to avoid wiping out anybody's saved searches. (Though if there aren't any such rows, go ahead and purge!)
- Demian
________________________________________
From: Eric Lease Morgan [emorgan@...]
Sent: Monday, January 23, 2012 4:06 PM
To: vufind-tech@...
Subject: Re: [VuFind-Tech] the search table
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
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Vufind-tech mailing list
Vufind-tech@...
https://lists.sourceforge.net/lists/listinfo/vufind-tech
|