[Git][noosfero/noosfero][master] 2 commits: performance: index user_id on profiles
Bráulio Bhavamitra
gitlab at gitlab.com
Sun Aug 9 20:43:29 BRT 2015
Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero
Commits:
641a9594 by Braulio Bhavamitra at 2015-07-12T10:11:08Z
performance: index user_id on profiles
Select filter query from 8ms to 1ms
- - - - -
608ddc9d by Bráulio Bhavamitra at 2015-08-09T23:43:17Z
Merge branch 'index-user-id' into 'master'
performance: index user_id on profiles
Select filter query from 8ms to 1ms
See merge request !621
- - - - -
1 changed file:
- + db/migrate/20150712130827_index_user_id_on_profiles.rb
Changes:
=====================================
db/migrate/20150712130827_index_user_id_on_profiles.rb
=====================================
--- /dev/null
+++ b/db/migrate/20150712130827_index_user_id_on_profiles.rb
@@ -0,0 +1,8 @@
+class IndexUserIdOnProfiles < ActiveRecord::Migration
+
+ def change
+ add_index :profiles, :user_id
+ add_index :profiles, [:user_id, :type]
+ end
+
+end
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/31430d6c303b3d371071089001aa1eb6c73957b2...608ddc9dfd943981559cdd26efc827c61d78f9c4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150809/ae92fcdb/attachment.html>
More information about the Noosfero-dev
mailing list