There is one 'primary' key - a mix of server, timestamp, and ipaddress
This is a few server access logs put into a database
Also - if you know of a good tutorial on keys - i have been trying to read up - but everywhere either deals with what they are or how to optimize queries, and none of them seem to deal with the issue together
crabpot8
____________________________________________
Field Type Null Default
ip_address char(15) No
timestamp timestamp No CURRENT_TIMESTAMP
filename varchar(1000) Yes NULL
http_status smallint(6) Yes NULL
bytes_sent int(11) Yes NULL
client_info text Yes NULL
client_id text Yes NULL
client_stat_results text Yes NULL
file_size int(11) Yes NULL
send_time int(11) Yes NULL
resends smallint(6) Yes NULL
failed_resends smallint(6) Yes NULL
pres_id smallint(6) Yes NULL
file_time int(11) Yes NULL
helix_ enum('a', 'b') No a
Indexes:
Keyname Type Cardinality Field
PRIMARY PRIMARY 55485 ip_address
timestamp
helix_
Space usage:
Type Usage
Data 39,552 KiB
Index 0 B
Total 39,552 KiB
Row Statistics:
Statements Value
Format Compact
Rows 73,709
Row length ř 549
Row size ř 549 B
Creation Feb 04, 2008 at 12:36 PM
________________________________________________
here are the types of query i have to run ran - each took over 20 seconds
Expand|Select|Wrap|Line Numbers
- SELECT COUNT(*) FROM rmaccess WHERE timestamp BETWEEN 20080225004627 AND 20080225014627
- SELECT COUNT(*) FROM rmaccess WHERE timestamp BETWEEN 20080225014627 AND 20080225024627
- SELECT COUNT(*) FROM rmaccess WHERE timestamp BETWEEN 20080225024627 AND 20080225034627
MODERATOR