MySQL Forums
Forum List  »  Optimizer & Parser

Re: What is meaning of "func" in "ref" column of EXPLAIN plan
Posted by: Rick James
Date: August 08, 2011 07:52PM

`createdate` varchar(8) DEFAULT NULL,
`createtime` varchar(8) DEFAULT NULL,
Recommend having a single column of type DATETIME or TIMESTAMP.

int(2) is still a 32-bit integer; the (2) means virtually nothing. Consider TINYINT.

Prefix indexes are virtually useless:
KEY `ship_name_idx` (`Ship_LastName`(24),`Ship_FirstName`(8)),

There is no advantage for (10) in this case:
KEY `phone_idx` (`Phone`(10)),

Reversing the fields in
KEY `datetype_idx` (`created`,`type`)
would help with
AND (AccountsReceivable.created BETWEEN '20071004' AND '20071011')
AND (AccountsReceivable.type ="CHARGE")

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: What is meaning of "func" in "ref" column of EXPLAIN plan
2289
August 08, 2011 07:52PM


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.