![]() | |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
Assume I have 930 milliom records. |
|
Doing a binary search takes 30 disk-reads, which I think, are too slow. |
|
1. Is MySQL index a B-tree ? |
|
2. Can I create an auxilliary index table (ie index of index) to speed up the search ? |
|
Thanks for advice. |
#3
| ||||
| ||||
|
|
Op 13-3-2010 9:48, sl@my-rialto schreef: Assume I have 930 milliom records. i presume you do mean 930 million ? |
|
Doing a binary search takes 30 disk-reads, which I think, are too slow. than you should buy a quicker disk... |
|
1. Is MySQL index a B-tree ? read the docs... |
|
2. Can I create an auxilliary index table (ie index of index) to speed up the search ? this question i would like to leave to the experts.. ;-) |
#4
| |||
| |||
|
|
Luuk: Op 13-3-2010 9:48, sl@my-rialto schreef: Doing a binary search takes 30 disk-reads, which I think, are too slow. than you should buy a quicker disk... With these numbers, even if the records are only half a kilobyte, it's going to be a 1TB-disk to store the data. Do you know extremely fast disks of this size, that really would make a difference in this case? |
#5
| |||
| |||
|
|
Erick T. Barkhuis wrote: Luuk: Op 13-3-2010 9:48, sl@my-rialto schreef: Doing a binary search takes 30 disk-reads, which I think, are too slow. than you should buy a quicker disk... With these numbers, even if the records are only half a kilobyte, it's going to be a 1TB-disk to store the data. Do you know extremely fast disks of this size, that really would make a difference in this case? I can't think that anyone else than home users would use just one hard disk, the database servers I have seen all uses some kind of raided system, and you can with the right raid get a multiple smaller hard drives to be far faster than just one big one. |
#6
| |||
| |||
|
|
Luuk: Op 13-3-2010 9:48, sl@my-rialto schreef: Assume I have 930 milliom records. i presume you do mean 930 million ? Oh, c'mon Luuk! :-) Doing a binary search takes 30 disk-reads, which I think, are too slow. than you should buy a quicker disk... With these numbers, even if the records are only half a kilobyte, it's going to be a 1TB-disk to store the data. Do you know extremely fast disks of this size, that really would make a difference in this case? |
| 1. Is MySQL index a B-tree ? read the docs... MySQL offers the BTREE index option, yes. I believe the InnoDB engine uses them by default. Here's a document for starters http://www.informit.com/articles/article.aspx?p=377652 |
#7
| |||
| |||
|
|
Assume I have 930 milliom records. Doing a binary search takes 30 disk-reads, which I think, are too slow. |
|
1. Is MySQL index a B-tree ? 2. Can I create an auxilliary index table (ie index of index) to speed up the search ? |
|
Thanks for advice. |
#8
| |||
| |||
|
|
Assume I have 930 milliom records. Doing a binary search takes 30 disk-reads, which I think, are too slow. 1. Is MySQL index a B-tree ? 2. Can I create an auxilliary index table (ie index of index) to speed up the search ? Thanks for advice. |
#9
| |||
| |||
|
|
J.O. Aho wrote: Erick T. Barkhuis wrote: Luuk: Op 13-3-2010 9:48, sl@my-rialto schreef: Doing a binary search takes 30 disk-reads, which I think, are too slow. than you should buy a quicker disk... With these numbers, even if the records are only half a kilobyte, it's going to be a 1TB-disk to store the data. Do you know extremely fast disks of this size, that really would make a difference in this case? I can't think that anyone else than home users would use just one hard disk, the database servers I have seen all uses some kind of raided system, and you can with the right raid get a multiple smaller hard drives to be far faster than just one big one. |
|
Yes. the bottleneck in disks is generally seek time. So smaller disks work better. |
|
The other thing that dramatically speeds up disk is massive amounts of RAM to cache it all in. |
#10
| |||
| |||
|
|
Because the index is in a separate file, this would be better way to search the index, compared to InnoDB which combines data and indexes in one physical file according to the same document. |
![]() |
| Thread Tools | |
| Display Modes | |
| |