launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #08514
Re: notifications - an implementation straw man (warning explicit discussion of services follows)
print "create temporary table temp_topic_events (topic integer, event
integer, date timestamp );"
print "begin;"
for event in xrange(10000000):
topic = int(random.random() * 10000)
days_old = int(random.random() * 720)
print "insert into temp_topic_events values (%s, %s, now() - '%s
days'::interval);" % (topic, event, days_old)
print "commit;"
print "create index topic_events__date__topic_idx on temp_topic_events
(date, topic);"
then python demo.py > demo.sql,
psql launchpad_dev
\i demo.sql
and play with some arbitrary queries after that.
-Rob
Follow ups
References