Hi Sergei!
As i told you i was prototyping for hash table
It is done around 90% apart from one thing when hash is same
how to get record from .myd file when i have offset of record
so currently i am skipping it
But it is very fast i do not know why this is so fast here are
results of employee database
salary table definition
CREATE TABLE salaries (
emp_no INT NOT NULL,
salary blob NOT NULL,
from_date DATE NOT NULL,
to_date DATE NOT NULL,
FOREIGN KEY (emp_no) REFERENCES employees (emp_no) ON DELETE CASCADE,
PRIMARY KEY (emp_no, from_date)
)
;
And query is
MariaDB [employees]> select distinct salary from salaries;
Result with out using hash table
+--------+
85814 rows in set (2 min 24.76 sec)
Result with using hash table
| 39420 |
+--------+
85809 rows in set (6.24 sec)
( number of rows are not equal but this can be solved if i get record by offset)
I am sure there is something wrong.The whole hash table is in memory like wise the
b tree of hash is in memory but why there is so much improvement. Please sir check the
prototype and tell if i am wrong .thanks
Regards
sachin