0

This morning I was introduced to the concept of compressing a database cache to allow a bigger cache in a given amount of RAM. I understand Microsoft SQL 2008 offers this functionality.

I was wondering if there is similar functionality available for MySQL?

Brent
  • 22,857
  • 19
  • 70
  • 102
  • Version "8" is SQL Server 2000 (9 = SQL 2005, 10 = SQL 2008). SQL Server does not deliberately compress in cache: only if the data on disk is compressed explicitly using the new features in SQL Server 2008 – gbn Jul 03 '09 at 06:19
  • Oops - I meant SQL 2008, not version 8. I'll edit the post. – Brent Jul 03 '09 at 20:06

2 Answers2

1

i'm affraid it does not have.

it can compress data while replicating...

.. and there is new innodb storage plugin that does data compression.

but not in ram. up to my knowledge.

but if you deal with blobs - just store them compressed [ using mysql function or even your external application ] - i do it in one of projects. in this way data cached in ram and stored on disk is compressed; in my case it's role of application layer to decompress it.

pQd
  • 29,981
  • 6
  • 66
  • 109
1

It is dependent on the engine. Each engine implements its own cache (unless you count the query cache, which is not really useful in most cases).

Engines which use compression and have their own block caching system, for example InnoDB-plugin or Falcon, will probably do this automatically. That's because they cache in the format that the blocks are stored on disc, which means compressed.

The HEAP (in-memory) engine does not do compression (in fact, the standard HEAP engine is very inefficient, it doesn't support variable-length rows)

Engines which use the OS's cache will cache in whatever form they keep the data on the disc, for example, the Archive engine (which uses compression on-disc) will therefore keep compressed blocks in the OS's cache.

MarkR
  • 2,928
  • 17
  • 13