A method comprising steps of: receiving, by a storage device which stores data blocks in a base major format in one or more primary storage devices (120-1-1,..., 120-n-s) and which is configured to receive requests from a database server, a first request from said database server for data stored in said storage device, said storage device comprising a cache; wherein said base major format is any one of: a row-major format, a column-major format and a hybrid-columnar format; in response to receiving the first request for said data stored in said storage device: said storage device determining, based on first one or more criteria, to rewrite said data into rewritten data in a rewritten major format; in response to determining to rewrite said data into rewritten data in a rewritten major format: said storage device rewriting at least a portion of said data into particular rewritten data in said rewritten major format; and storing said particular rewritten data in said cache; said storage device receiving a second request from said database server for said data stored in said storage device; in response to receiving said second request, said storage device determining, based on second one or more criteria, to access said particular rewritten data to satisfy said second request; and in response to determining, based on second one or more criteria, to access said particular rewritten data to satisfy said second request, said storage device accessing said particular rewritten data stored in said cache. receiving, by a storage device which stores data blocks in a base major format in one or more primary storage devices (120-1-1,..., 120-n-s) and which is configured to receive requests from a database server, a first request from said database server for data stored in said storage device, said storage device comprising a cache; wherein said base major format is any one of: a row-major format, a column-major format and a hybrid-columnar format; in response to receiving the first request for said data stored in said storage device: said storage device determining, based on first one or more criteria, to rewrite said data into rewritten data in a rewritten major format; in response to determining to rewrite said data into rewritten data in a rewritten major format: said storage device rewriting at least a portion of said data into particular rewritten data in said rewritten major format; and storing said particular rewritten data in said cache; said storage device determining, based on first one or more criteria, to rewrite said data into rewritten data in a rewritten major format; in response to determining to rewrite said data into rewritten data in a rewritten major format: said storage device rewriting at least a portion of said data into particular rewritten data in said rewritten major format; and storing said particular rewritten data in said cache; said storage device rewriting at least a portion of said data into particular rewritten data in said rewritten major format; and storing said particular rewritten data in said cache; said storage device receiving a second request from said database server for said data stored in said storage device; in response to receiving said second request, said storage device determining, based on second one or more criteria, to access said particular rewritten data to satisfy said second request; and in response to determining, based on second one or more criteria, to access said particular rewritten data to satisfy said second request, said storage device accessing said particular rewritten data stored in said cache.