Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Wonderful World Of Databases

The Wonderful World Of Databases

A talk I gave at RuPy 2012 - discussing databases, their architecture and history, and how to make them happy.

Avatar for Andrew Godwin

Andrew Godwin

November 18, 2012
Tweet

More Decks by Andrew Godwin

Other Decks in Programming

Transcript

  1. ?

  2. =

  3. Asynchronous Calls import psycopg2 import eventlet eventlet.monkey_patch(psycopg2=True) cur1 = psycopg2.connect().cursor()

    cur2 = psycopg2.connect().cursor() cur1.execute("BIG SELECT") cur2.execute("ANOTHER SELECT") results1 = cur1.fetchall() results2 = cur2.fetchall()
  4. Document Stores • Easy to add data • You still

    need schema • Large updates can be slow
  5. # explain select * from aeblog_post where id = 50;

    QUERY PLAN --------------------------------------------------- Index Scan using aeblog_post_pkey on aeblog_post (cost=0.00..8.27 rows=1 width=1812) Index Cond: (id = 50)
  6. # explain select * from aeblog_post where section = 'trip-notes';

    QUERY PLAN --------------------------------------------------- Seq Scan on aeblog_post (cost=0.00..14.21 rows=1 width=1812) Filter: ((section)::text = 'trip-notes'::text)