Re: adding an index of my own type/code
Stewart Smith <[email protected]> Tue, 23 Apr 2013 09:28:48 -0700
| Newsgroups | gmane.comp.db.mysql.devel |
|---|---|
| Message-ID | <[email protected]> |
AugustQ <[email protected]> writes: > I'm using the source-code of MySQL-version 5.5.8 You really want to use something more recent. 5.5.8 is ancient. > I want to implement my own type of an index and play with it. How can I > do this? You have to do this inside a storage engine, the MySQL server itself doesn't deal with indexing (although the optimizer obviously has some knowledge). > It's easy to add a storage engine. For creating the index on a table I > use a statement like: > create index PRIMA3 > on ABDAOK(Id, PZN, ArtikelBez) > type AQTREE; > > I go a syntax-error: ERROR 1064 (42000) > > What do I have to do to implement my own index-code? Pick an engine: MyISAM, Heap, InnoDB (default) or one of the third party ones and go for it. Getting any actual code merged into MySQL if you don't work for Oracle is... well... problematic at best. If you're wanting to experiment with different indexing methods, it is possible that the PostgreSQL code is a better choice - and a higher chance of ever having code integrated. You can, of course, write your own storage engine with whatever indexing methods you like (and just lie to the optimizer about it being like a BTREE :) > Is there a newer version that supports this better? No. Drizle takes away some of the server side issues, but it's still all the responsibility of the storage engine. -- Stewart Smith
signature.asc
(application/pgp-signature, 835 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJRdrbBAAoJEP08notdpDyvprgQAJz0EaPWVKJGkvVEgrS+cA6M UZjNXtc5EhKYJr7IV6YhonXsD+aHN9EGNuHsEK1maoALWuEbnu1seEUwQKxbv3At cK9jSLp3Jadl3FDbLo7ihvAAPMDoFUXWCt4hTXmS0jcDLWnX7fG53XNUY2PK5ObS DZ03nj8OH5dx20IJ1r7YOEjJ64Ytc5AGIgirCKHkJIVxsBLncpCs0UFOyA5U0oaS VtxXISvGQGe/Dlq1hByVWv6HI0V4cKHdP2WY3aifwmIoeJubQCg0+i6AjR8gTBos I8Y/LQ7YyVO8vPCNHjxg8E+WeNTSBK5WZrEcsluMmB3s3T+HsUac4QfQjP7aEAm9 uOFv6BnoVC+QQMbEsVyFnzVYRA5tHzVyKp/oOLT+27AOxGEjNn4X668bwHtQg/Rl jP2XbsM/BRhZOvRfY5S1KPb8lchUoJvdjQmetnLawZYEexMP/jC46+hvi7BuaAFv vPAVUR3lO89OHgh2oybcsH7g324nqj3aPPY2EozjITysOjoRk6/yp0iKgJfrgLcz lVivNTelx0EKAmchSmfuvNr+/axRhF3lwVlDA4PONPod4Gmnbq3x7ndBrikx+sl6 vrXjdUy0Ld9m97sMSHogUQQsO+9N/BkPB/+gWo1IcJejLTJcnT+hVVLZaIONzEkT Hk1IjYYaXM8cslSKBnGl =4EeT -----END PGP SIGNATURE-----