MySQL Forums
Forum List  »  Optimizer & Parser

Re: How can I optimize this query?
Posted by: Martin Schiff
Date: March 16, 2010 07:58AM

Rick,

Thanks for your quick reply. Sorry I took so long to get back, but we had some family issues this weekend.

id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	<derived2>	ALL	NULL	NULL	NULL	NULL	151	Using temporary; Using filesort
1	PRIMARY	cb	ALL	PRIMARY,startIpNum,endIpNum	NULL	NULL	NULL	3786204	Range checked for each record (index map: 0xD)
1	PRIMARY	cl	eq_ref	PRIMARY	PRIMARY	33	geoipdb.cb.locId	1	 
2	DERIVED	stats	range	longip	longip	38	NULL	6	Using where; Using index for group-by

CREATE TABLE `cityblocks` (\n  `startIpNum` bigint(10) NOT NULL,\n  `endIpNum` bigint(10) NOT NULL,\n  `locId` mediumint(9) NOT NULL,\n  
PRIMARY KEY  (`startIpNum`,`endIpNum`),\n  KEY `locId` (`locId`),\n  KEY `startIpNum` (`startIpNum`),\n  KEY `endIpNum` (`endIpNum`)\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci

geoipdb.cityblocks	check	status	OK

Options: ReplyQuote


Subject
Views
Written By
Posted
5311
March 12, 2010 02:40PM
2343
March 13, 2010 04:07PM
1770
March 13, 2010 04:17PM
1933
March 16, 2010 08:22AM
2403
April 14, 2010 02:27AM
Re: How can I optimize this query?
1935
March 16, 2010 07:58AM
1868
March 27, 2010 03:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.