Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Performance in like queries: msg#00047

db.maxdb

Subject: Re: Performance in like queries

Edson Carlos Ericksson Richter wrote:
select * from mytable where mydescription like '%something%'

For this query, the execution plan doesn't uses the index containing mytable.mydescription, and take near to 68,09 secs (~32 times slower).
Why the "explain" says index use for first query, and a table scan for the second?

Using an index is just like using a dictionary. When you're looking for all words starting with 'in', you will quickly scan the pages to go the entry for 'in'. From then on, you'll read entry by entry until you've reached 'im' and you're done.

If you're looking for all words *containing* 'in', you have no other choice but to start with the first word of the dictionary and to read every entry.

Other kind of indexes are imaginable that keep track of substrings as well (full text searches work that way), but MaxDB doesn't support this.

Daniel Dittmar

--
Daniel Dittmar
SAP Labs Berlin
daniel.dittmar@xxxxxxx


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo