|
> 为什么说最佳的存储应该是列?
A blanket statement like that is obviously wrong. According to
https://en.wikipedia.org/wiki/Column-oriented_DBMS
"Whether or not a column-oriented system will be more efficient in operation depends heavily on the workload being automated. It would appear that operations that retrieve data for objects would be slower, requiring numerous disk operations to collect data from multiple columns to build up the record. However, these whole-row operations are generally rare. In the majority of cases, only a limited subset of data is retrieved."
So it really depends on the query. A column store is bad for queries that need many columns of a row, because you have to get the data one column at a time. Fortunately, many real-world cases only need one or very few columns at a time.
The Wikipedia page is actually quite readable. It's a very good summary of this type of database. |
|