21.05.2014 Views

PostgreSQL as a secret weapon for high-performance ... - PGCon

PostgreSQL as a secret weapon for high-performance ... - PGCon

PostgreSQL as a secret weapon for high-performance ... - PGCon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Rails Per<strong>for</strong>mance > Access Control<br />

Optimization Effect:<br />

can_do_1 = user.roles.any { |role| role.privilege1? }<br />

> 2.1 sec<br />

can_do_1 = ActiveRecord::ConnectionAdapters::Column.<br />

value_to_boolean(user.privilege1)<br />

> 64 msec !!!<br />

Gleb Arshinov & Alex Dymo ● <strong>PostgreSQL</strong> <strong>as</strong> a <strong>secret</strong> <strong>weapon</strong> <strong>for</strong> <strong>high</strong>-per<strong>for</strong>mance Ruby on Rails applications ● <strong>PGCon</strong> 2010 36 / 58

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!