A method performed by one or more computing devices, the method comprising: loading each XML document of a plurality of XML documents into a table in which said XML documents are stored in shredded form, wherein loading said each XML document comprises: generating, from said XML document, a plurality of column values of a plurality of columns of the table, said plurality of column values to be stored in a plurality of rows in the table; analyzing said plurality of column values; for each column of said plurality of columns and those column values of the plurality of column values that are generated from said XML document for this column, making a determination of a row-storage format for storing said column values, said making a determination including: determining whether to store said column values in column-major or row-major format, and determining whether to use a compression technique to compress said column values; and storing the column values according to said determinations of the row-storage format for said plurality of columns; wherein said plurality of XML documents includes a first XML document and a second XML document; wherein for said first XML document and for a particular column of said plurality of columns, said particular column comprising first particular column values generated from said first XML document, said making a determination of the row-storage format includes to store said first particular column values of said particular column in column-major format; and wherein for said second XML document and for said particular column of said plurality of columns, said particular column comprising second particular column values generated from said second XML document, said making a determination of the row-storage format includes to store said second particular column values of said particular column in row-major format. loading each XML document of a plurality of XML documents into a table in which said XML documents are stored in shredded form, wherein loading said each XML document comprises: generating, from said XML document, a plurality of column values of a plurality of columns of the table, said plurality of column values to be stored in a plurality of rows in the table; analyzing said plurality of column values; for each column of said plurality of columns and those column values of the plurality of column values that are generated from said XML document for this column, making a determination of a row-storage format for storing said column values, said making a determination including: determining whether to store said column values in column-major or row-major format, and determining whether to use a compression technique to compress said column values; and storing the column values according to said determinations of the row-storage format for said plurality of columns; generating, from said XML document, a plurality of column values of a plurality of columns of the table, said plurality of column values to be stored in a plurality of rows in the table; analyzing said plurality of column values; for each column of said plurality of columns and those column values of the plurality of column values that are generated from said XML document for this column, making a determination of a row-storage format for storing said column values, said making a determination including: determining whether to store said column values in column-major or row-major format, and determining whether to use a compression technique to compress said column values; and determining whether to store said column values in column-major or row-major format, and determining whether to use a compression technique to compress said column values; and storing the column values according to said determinations of the row-storage format for said plurality of columns; wherein said plurality of XML documents includes a first XML document and a second XML document; wherein for said first XML document and for a particular column of said plurality of columns, said particular column comprising first particular column values generated from said first XML document, said making a determination of the row-storage format includes to store said first particular column values of said particular column in column-major format; and wherein for said second XML document and for said particular column of said plurality of columns, said particular column comprising second particular column values generated from said second XML document, said making a determination of the row-storage format includes to store said second particular column values of said particular column in row-major format.