Hi, Sachin! On Apr 19, Sachin Setia wrote:
Hello Sergei! I am sorry , I pressed Ctrl + Enter so first message is an incomplete message Actually first I was thinking instead of storing hash as b+tree store it in hash table But then i come to know that we can have range query in blob fields If we use hash table then range query will take O(n) time. I was reading mysql manual then i come across this term this will monitor mysql query and if it finds that there is lot of query using in or equal then it will build hash index from b+tree index.I want to implement same thing in myisam
Let's rather try to do it on the upper layer, in sql/ And then I'd be very interested to see if your hash index idea could be used to speed up SELECT DISTINCT. Long unique constraints in normal tables are not that interesting - a table might have many unique constraints, a table might have occasional inserts, mixed with selects, updates, deletes, and accesses to other tables. But a temporary table for SELECT DISTINCT - it has only one unique constraint, it gets lots of inserts/updates in a short period of time - it should be a perfect target for your hash index optimization. Regards, Sergei Chief Architect MariaDB and security@mariadb.org