Simple, database will never be faster then array in the memory carefully linked with specially crafted hash-function.
Data Base is very good if you have huge number per second of small transaction like ATM transactions all over country or if you need came up with analytical requests - new every time which involves many tables tight to each other. Also transaction support is very useful (COMMIT/ROLLBACK) if you have things to modify in many places depending on results of requests. But for packaging - which happens not to often and patching - more often then packaging - once in a 3 month or so, it is not reasonable. Plus that database "solution" we had substitutes contents file with one single table - which was simple reflection of contents file but in fixed length record instead of variable length string (so only this thing blow up registry size 20-30 times). In addition list of packages for directories was put in one single field of this record, so SELECT had to use wildcard for search - this is really SLOW! But even if implement this right it will be still slower than structure I use in pdo. In classical DB solution you have DB-server - really fast, powerful and expensive computer, enterprise level and many slow clients. Client can be cheap and slow, because all complicated operation are done on the server. In case of installation registry you do not have that stand alone server. So instead you put this db-server in each client. So in result in real life db running eats to much CPU time and get too much recourses that it is not reasonable any more. And for zones it will be total disaster, running db on each zone sharing same CPU! This is basic knowledge, but for some reason some people believe that database always faster then anything else. And it is hard to convince someone with such a strong believes. Again even for packages where Gary did not introduce new data structure but just start using memap() and binary search (it was sequential before!) we gain more then twice performance improvement. vassun This message posted from opensolaris.org
