As is usually the case, it depends on your table structure and how you 
are deleting. If you don't have any variable length fields (ie. varchar) 
then all your record lengths are exactly the same and the "empty" space 
can be reused for new records, preventing fragmentation. I'm only 95% 
positive that advice is correct, so someone correct me if I'm wrong.

When you say "truncate entirely" do you mean you're are performing a 
"DELETE FROM TABLE"? If so, then you have nothing to worry about. When 
deleting every record in a table, the system is essentially (actually?) 
deleting the database file and creating an entirely new one. So there 
will be no fragmentation because of this action.


On Tuesday, September 10, 2002, at 10:25 AM, Erick Papadakis wrote:

> hello
>
>   sql, query
>
> for various reasons, i need to do a cron job that will take a snapshot 
> of
> table1 (by snapshot i mean a temporary table), do some processing, and
> then save some scientific calculations to table2. after this, i need to
> "refresh" table1 -- i.e., truncate it entirely. i need to do this 
> every 5
> minutes so that table1 is "rotated" every 5 mins after my scientific
> calculations off it.
>
> my question is: does this have a negative impact on the table1 since it
> is being truncated every 5 minutes? That is roughly about
>
>     365 days * 24 hours * 12 times
>  =  105,120 times a year !!!
>
> my questions:
>
> 1. is there something else i can do? i considered writing text files
> instead of the DB, but then the 'processing' becomes a lot more
> complicated.
>
> 2. i considered making this special table1 in a separate tablespace ...
>
>    2a. would a different database be a different "table space" in mysql?
>    2b. would this help at all?
>
> would appreciate any insight/advice.
>
> thanks/erick
>
> __________________________________________________
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost
> http://dir.remember.yahoo.com/tribute
>
> ---------------------------------------------------------------------
> 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 <mysql-unsubscribe-
> [EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


---------------------------------------------------------------------
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