Monday May 26, 2008

PostgreSQL and Memcached

Last week, Trond and I played with PostgreSQL as a storage engine for Memcached. Great stuff if you think that the world is moving too fast, and want to slow down a bit ;-)

He forgot to post the table we used in the database. Nothing revolutionary, but here it is: 

DROP TABLE IF EXISTS memcached;
CREATE TABLE memcached (
        key VARCHAR (250),
        expire_time INT,
        header_size INT,        
        data BYTEA,
        CONSTRAINT pk_key PRIMARY KEY (key)
);

The data column contains both the Memcached header and the data from the application, it would probably be a better idea to store the header and the data in separate columns, then the header_size column could be removed as well.

About

I work with testing in Sun Microsystems Database Group in Trondheim, Norway, currently with MySQL 6.X. The plan is to write a little bit about what I do here. More about me at my homepage.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today