Wouldn't you rather tweak that setting in $SPECROOT/SS/DDM/.configrc
instead? I reduce MAX_STAT_DAYS and MAX_EVENT_DAYS just to get started.
However, I took a running swing at answering your question the way you
asked it ...
cd $SPECROOT/SS/DDM/mysql/bin
./mysql -uroot -proot ddmdb
show tables;
describe event;
select count(*) from event where utime > 1221350400;
select * from event where utime > 1221350400;
quit;
The utime is Unix epoch time.
You could consider replacing "select *" with "delete" ... I'd recommend
running that "select count(*)" before and after delete just as a reality
check. (Why? Because I don't know much SQL so Be Warned, Be Very Careful,
have a backup, and make changes AT YOUR OWN RISK. I've had to do time SQL
queries before, and I take notes, so I can make up the SQL for this.) And,
after I make big table changes, I usually run
optimize table event;
flush table event;
afterwards (replace "event" with the actual table name if you apply this
elsewhere). But even when I truncate the table (faster than iterating
through a delete all), I've rarely recovered as much disk space as I
expected. I've always had to take a larger view, application as a whole,
rather than mess with the MySQL internals. I've never tried this with
Spectrum, just with other apps with MySQL on the back end.
I hope this helps!
- Joni
--On October 8, 2008 4:44:42 PM +0200 Christian Schneider
<[EMAIL PROTECTED]> wrote:
Hi Community,
does anybody know how to reduce the size of the Spectrum Reporting DB
(MySQL)? We did already all the optimization etc but it is still very
large. We would like to take some data out of it (2 months or more)
Regards,
Christian Schneider
Enterprise Service Specialist
---
To unsubscribe from spectrum, send email to [EMAIL PROTECTED] with the body:
unsubscribe spectrum [EMAIL PROTECTED]