The Future of Performance: Scaling
Jason Pyeron
jpyeron at pdinc.us
Wed Jan 7 05:22:37 UTC 2009
> -----Original Message-----
> From: developers-owner at bugzilla.org
> [mailto:developers-owner at bugzilla.org] On Behalf Of Bradley Baetz
> Sent: Monday, January 05, 2009 17:38
> To: developers at bugzilla.org
> Subject: Re: The Future of Performance: Scaling
>
> On Mon, Jan 5, 2009 at 4:27 PM, David Lawrence <dkl at redhat.com> wrote:
>
> > What if we first did a select to see if there would be any cookies
> > older than 30 days returned and only then do a delete? The
> select at
> > least would not block like the delete would and if this worked it
> > would only in theory run once every 30 days or I may be wrong.
>
> I'd be depressed if that was true, but not really surprised
> :) Isn't RH using postgres, though?
>
> Anyway, an issue with this query is that "TO_DAYS(NOW()) -
> TO_DAYS(lastused) > 30" isn't indexable. Something like
> 'WHERE lastused < NOW()-30*24*60*60' would probably be
Just adding my $0.02.
delete from logincookies where lastused < date_add(curdate(), interval -31 DAY);
Should index well, and run on first access every 24 hours.
> better, although it doesn't help the underlying problem. Do
> we really not want to make people run a cron job? I guess it
> may be a bit tricky on windows, but are there hosting
> companies that let users run cgi scripts but not cron jobs?
>
> Bradley
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=jpyeron@pyerotechnics.com>
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
More information about the developers
mailing list