MySQL Forums
Forum List  »  Performance

Re: VARCHAR performance
Posted by: Rick James
Date: March 08, 2014 12:53PM

> rushid = "418bbafefd8f00506887f858b8160987" AND

Smells like ASCII, not UTF8. Changing the CHARACTER SET will provide some improvement.

> `tagtype` varchar(255) NOT NULL,

Do you really need 255? If not, make it shorter, and toss the 'prefix' (32) on the index. And check CHARACTER SET.

> I guess thay are wrong for anything more than 170.

_or_ utf8.

> WHERE tagtype = "Q_PixelAspect" AND
> rushid = "418bbafefd8f00506887f858b8160987" AND
> start < 139

That begs for a _compound_ index:
INDEX(tagtype, rushid, start), or
INDEX(rushid, tagtype, start)

The table has no PRIMARY KEY (or other UNIQUE index); are you allowing duplicates?

Options: ReplyQuote


Subject
Views
Written By
Posted
1952
March 06, 2014 05:15AM
903
March 07, 2014 08:48AM
874
March 07, 2014 10:01AM
844
March 07, 2014 10:13AM
749
March 07, 2014 10:57AM
Re: VARCHAR performance
968
March 08, 2014 12:53PM


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.