That all depends.

Do you need to keep the data for historical purposes?  Are your queries
running particularly  slowly? Have you read the manual about how you can
optimize?  Another thing to consider is disk space but I don't think you be
anywhere near the limit yet but I could be wrong.

----- Original Message -----
From: "Jan Namedyński" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 21:09
Subject: deleting old records VS. index on datetime field (question about
optimization)


> Hi,
> I have a table
>
>    DAY : DATETIME
> CAT_ID : INT
>   DATA : TEXT
>     ID : INT
>
> and I have to extract all records not older than 2 weeks with given
> CAT_ID (sorted by DAY).
>
> query for that is very simple, but what if this table has 1 000 000
> records? Do you think that deleting records older than eg. 2 weeks would
> accelerate all operation? And is it worth the price (no archive) ?
>
> btw. of course query is performed on table with all needed indexes.
>
> --
>
>                                 [EMAIL PROTECTED]
>
>                      { http://postmoderna.com ^ design studio }
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to