Skip to content

Instantly share code, notes, and snippets.

View vincentbernat's full-sized avatar

Vincent Bernat vincentbernat

View GitHub Profile
@vincentbernat
vincentbernat / bench.py
Created December 14, 2012 21:34 — forked from anonymous/bench.py
Trying to get efficient indexes with MongoDB
#!/usr/bin/env python
from pymongo import Connection, ASCENDING, DESCENDING
from datetime import datetime
c = Connection()
db = c['asynctask']
# Will select about 7/10 of the logs
now = datetime.now()
half = datetime(2012, 12, 13, 20, 30, 30, 0)