News for hackers. Stuff that matters.
Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by mike-cardwell on Tuesday November 09, 2010 @06:52AM (#1886153)
Neat. I didn't know you could do anything like that with MySQL. Does Postgres have an equivalent? I wouldn't move from an SQL DB to a NoSQL key/value store without a significant performance improvement. Seems like you can tune MySQL far more than I realised...
Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by quassnoi on Tuesday November 09, 2010 @08:21AM (#1886307)
InnoDB was initially designed as a KVS. MySQL only added the SQL frontend to it.

Initially, MySQL also supported BerkeleyDB, another KVS, but as for now they dropped the support.

From InnoDB's point of view, MySQL is just a client, as is HandlerSocket the author is using.

PostgreSQL's storage engine is much more closely integrated into the system and has no low-level API easily available from the outside.

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by morgo on Tuesday November 09, 2010 @01:08PM (#1887328)
Yes, InnoDB was standalone. But it had it's own SQL parser and things like Stored Procedures as well ;) It was rudimentary, but I don't know if KVS is the best description.

How MySQL and InnoDB talk is very much a K<->V / row based relationship.

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by davecardwell on Tuesday November 09, 2010 @06:56AM (#1886159)
There are a couple of comments on the original article that mention this:

PostgreSQL supports C-based UDF so it might not be impossible, but I'm not sure whether PostgreSQL has a standard/documented/safe way to access to internal data structures from UDFs.

…and…

Yoshinori-san, very interesting! We use a similar technique for our site together Postgresql. We have our own Software ODBA that writes SQL, marshals the data and puts the marshaled Data into the PGsql-DB. All of our data is always in the memory if the Application is running. ODBA is written in Ruby. You can find it here: http://scm.ywesee.com/?p=odba/.git;a=summary

So maybe?

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by steveklabnik on Tuesday November 09, 2010 @08:01AM (#1886265)
I don't know if they're using a particular feature, but Reddit is basically using Postgres as a KVS.

They said it was actually faster than other KVSes they tried. This was also a while ago.

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by edanm on Tuesday November 09, 2010 @08:08AM (#1886276)
I actually just looked up the video where they talk about this yesterday.

Here it is: http://thinkvitamin.com/code/steve-huffman-on-lessons-learne...

It's called "Lessons Learned at Reddit", and mostly talks about building and deploying large-scale web applications (the technical, not business side of things.) Well worth watching (there's also a transcript.)

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by jdub on Tuesday November 09, 2010 @08:27AM (#1886317)
The latest release of PosgreSQL includes hstore:

http://www.postgresql.org/docs/current/static/hstore.html

Re:Using MySQL as a NoSQL - A story for exceeding 750,000 qp... by quassnoi on Tuesday November 09, 2010 @08:44AM (#1886352)
This is a single-value KVS within a field, not a replacement for SQL. You still need to write an SQL statement to access it.