473,412 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Delete questions and speed/safety issues

------_=_NextPart_001_01C3671C.01DAD650
Content-Type: text/plain;
charset="iso-8859-1"

I'm in the process of writing a Perl script to delete records out of a
database when the records are more than 90 days old. I'm running MySQL
version 4.0.12-standard. The db consists of around 620 MyISAM tables with
the following structure:

CREATE TABLE `ifInErrors_2` (
`id` int(11) NOT NULL default '0',
`dtime` datetime NOT NULL default '0000-00-00 00:00:00',
`counter` bigint(20) NOT NULL default '0',
KEY `ifInErrors_2_idx` (`dtime`)
) TYPE=MyISAM;

The tables range in size from 1-2 rows upwards to over 9,200,000 with an
average of around 570,000 rows. Updates to this database run constantly (it
records information from a program that monitors the routers and switches on
my company's WAN) at a rate of around 2600 inserts/minute.

I had originally planned to use syntax similar to:

DELETE * FROM table_name WHERE `dtime` < [90 days ago]

After the DELETE runs, I plan on running MYISAMCHK on the affected table.
Then I'll repeat both steps for all of the other tables in turn.

Does anyone have any suggestions for alternatives or is there anything I'm
missing here? I'm new to this stuff and may be way off base here. If so,
please tell me.

One last thing. I'm running out of Drive space and am I/O bound - I'm
writing this script in case I can't get the RAID array I'm hoping for.
Because of the I/O problem, execution time can sometimes be a factor in what
I do. Execution speed is a primary concern. If this takes a day or two to
run but the application can be running at the same time then there's no
problem. But if I have to shut down my application for any appreciable
length I time, then I have to find another way of doing this.

Thanks,

Jack

Jack Coxen
IP Network Engineer
TelCove
712 North Main Street
Coudersport, PA 16915
814-260-2705
------_=_NextPart_001_01C3671C.01DAD650--
Jul 19 '05 #1
0 1039

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
0
by: Jack Coxen | last post by:
------_=_NextPart_001_01C3671C.01DAD650 Content-Type: text/plain; charset="iso-8859-1" I'm in the process of writing a Perl script to delete records out of a database when the records are more...
0
by: Creigh Shank | last post by:
Using an Apache/PHP/MySQL/Linux (Redhat 8.0) solution, PHPList, to create an e-mailing list for our 5.6 million book club members. Unfortunately, the import speed for importing records (at record...
2
by: Howard Swope | last post by:
Could someone help explain thread safety issues in the System.Collections classes? The documentation states:...
3
by: silver360 | last post by:
Hello, I'm trying to create a basic Heap manager and i have some question about new/delete overloading. The following code give me this output : >> $./heap >> registered : 0x804d098 >>...
4
by: Dean Craig | last post by:
I'm getting ready to build my first ASP.NET/SQL Server website that will be hosted on some web host out there (long distance, different network). The work I've done in the past (pre-.NET) was all...
4
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and...
4
by: shamirza | last post by:
4 9 6 18.ATLAS-AJAX Note: - As an IT professional it's useful to know what the difference is between Hype and usefulness. For instance if there is a new technology coming in many programmers...
11
by: Ed Dror | last post by:
Hi there, I'm using ASP.NET 2.0 and SQL Server 2005 with VS 2005 Pro. I have a Price page (my website require login) with GridView with the following columns PriceID, Amount, Approved,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.