query efficiency

2011-09-27 Thread supr_star
Here's a simple query: select name,status,min(dt), max(dt),count(*) from mytable group by name I need an efficient way to get this data, along with the status of the row with the max(dt).  'status' is not in the group by, so I get apparently random statuses.  Is there any way to do this witho

query optimization

2011-09-22 Thread supr_star
 I have a table with 24 million rows, I need to figure out how to optimize a query.  It has to do with mac addresses and radius packets - I want to see the # of connections and the min/max date. So I basically want all this data:   select cpe_mac,count(*) c,min(r3_dt) mindt,max(r3_dt) maxdt, m

very large import

2011-08-03 Thread supr_star
I recently recovered a very large corrupt database with your help.  Now I'm having a problem during the next step, importing all the data back into a clean system.  I have a 24GB dump file, the ibdata1 file was about 100GB when the disk filled and everything got wrecked.  I have a server with a

corrupt innodb database

2011-08-01 Thread supr_star
I'm not sure if this is the correct way to post, my apologies if it's not..   Anyway, I have a zabbix system on a mysql database where the ibdata1 file grew to 93GB and filled up the disk.  Restarting mysql results in: /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! Th