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.

077e9a0cb34fa3eba2699240c9509717?s=128

Andrew Godwin

November 18, 2012
Tweet

Transcript

  1. 2.

    ?

  2. 3.
  3. 4.
  4. 5.
  5. 6.

    =

  6. 19.
  7. 20.
  8. 22.

  9. 25.

    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()
  10. 26.

    Document Stores • Easy to add data • You still

    need schema • Large updates can be slow
  11. 32.

    # 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)
  12. 33.

    # 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)