I have a database for ASN information in which I save asn information for reference by other scripts (asn lookup can be expensive).
CREATE TABLE `ASNINFO` ( `asnInfoID` int(11) NOT NULL auto_increment, `asNumber` int(11) NOT NULL default '0', `description` varchar(255) default NULL, `comment` varchar(255) default NULL, `f_time_stamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`asnInfoID`), UNIQUE KEY `asNumber` (`asNumber`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Multiple Ips can share the same ASN value. Is it better to do an 'insert ignore' into ASNINFO when I have to look one up, or is it better to try to fetch the ASN information to see if it exists, and then if it does not exist, do the insert. I figure the fetch is one sql command, and the insert is one sql command, so if an asn does not exist, it is two data base accesses, where if I do an 'insert ignore' it is only one command and if the value is in the table, the insert is ignored. Thanks, Connie Connie Logg, Network Analyst Stanford Linear Accelerator Center ph: 650-926-2879 "Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life." -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]