eager_counting 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +80 -0
- data/Rakefile +34 -0
- data/lib/eager_counting.rb +4 -0
- data/lib/eager_counting/count_by.rb +87 -0
- data/lib/eager_counting/version.rb +3 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/action.rb +6 -0
- data/test/dummy/app/models/comment.rb +5 -0
- data/test/dummy/app/models/country.rb +3 -0
- data/test/dummy/app/models/place.rb +6 -0
- data/test/dummy/app/models/product.rb +3 -0
- data/test/dummy/app/models/user.rb +3 -0
- data/test/dummy/app/models/visit.rb +8 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150727081137_create_users.rb +8 -0
- data/test/dummy/db/migrate/20150727081314_create_countries.rb +8 -0
- data/test/dummy/db/migrate/20150727081755_create_places.rb +9 -0
- data/test/dummy/db/migrate/20150727081827_create_visits.rb +10 -0
- data/test/dummy/db/migrate/20150727081904_create_products.rb +8 -0
- data/test/dummy/db/migrate/20150727081905_create_actions.rb +10 -0
- data/test/dummy/db/migrate/20150727082016_create_comments.rb +9 -0
- data/test/dummy/db/schema.rb +68 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +110 -0
- data/test/dummy/log/test.log +1437 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/models/action_test.rb +7 -0
- data/test/dummy/test/models/comment_test.rb +7 -0
- data/test/dummy/test/models/country_test.rb +7 -0
- data/test/dummy/test/models/place_test.rb +7 -0
- data/test/dummy/test/models/product_test.rb +7 -0
- data/test/dummy/test/models/visit_test.rb +7 -0
- data/test/eager_counting_test.rb +85 -0
- data/test/test_helper.rb +19 -0
- metadata +257 -0
@@ -0,0 +1,68 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20150727082016) do
|
15
|
+
|
16
|
+
create_table "actions", force: :cascade do |t|
|
17
|
+
t.integer "visit_id"
|
18
|
+
t.integer "product_id"
|
19
|
+
t.datetime "created_at", null: false
|
20
|
+
t.datetime "updated_at", null: false
|
21
|
+
end
|
22
|
+
|
23
|
+
add_index "actions", ["product_id"], name: "index_actions_on_product_id"
|
24
|
+
add_index "actions", ["visit_id"], name: "index_actions_on_visit_id"
|
25
|
+
|
26
|
+
create_table "comments", force: :cascade do |t|
|
27
|
+
t.integer "commentable_id"
|
28
|
+
t.string "commentable_type"
|
29
|
+
t.datetime "created_at", null: false
|
30
|
+
t.datetime "updated_at", null: false
|
31
|
+
end
|
32
|
+
|
33
|
+
add_index "comments", ["commentable_type", "commentable_id"], name: "index_comments_on_commentable_type_and_commentable_id"
|
34
|
+
|
35
|
+
create_table "countries", force: :cascade do |t|
|
36
|
+
t.datetime "created_at", null: false
|
37
|
+
t.datetime "updated_at", null: false
|
38
|
+
end
|
39
|
+
|
40
|
+
create_table "places", force: :cascade do |t|
|
41
|
+
t.integer "country_id"
|
42
|
+
t.datetime "created_at", null: false
|
43
|
+
t.datetime "updated_at", null: false
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index "places", ["country_id"], name: "index_places_on_country_id"
|
47
|
+
|
48
|
+
create_table "products", force: :cascade do |t|
|
49
|
+
t.datetime "created_at", null: false
|
50
|
+
t.datetime "updated_at", null: false
|
51
|
+
end
|
52
|
+
|
53
|
+
create_table "users", force: :cascade do |t|
|
54
|
+
t.datetime "created_at", null: false
|
55
|
+
t.datetime "updated_at", null: false
|
56
|
+
end
|
57
|
+
|
58
|
+
create_table "visits", force: :cascade do |t|
|
59
|
+
t.integer "place_id"
|
60
|
+
t.integer "user_id"
|
61
|
+
t.datetime "created_at", null: false
|
62
|
+
t.datetime "updated_at", null: false
|
63
|
+
end
|
64
|
+
|
65
|
+
add_index "visits", ["place_id"], name: "index_visits_on_place_id"
|
66
|
+
add_index "visits", ["user_id"], name: "index_visits_on_user_id"
|
67
|
+
|
68
|
+
end
|
Binary file
|
@@ -0,0 +1,110 @@
|
|
1
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (1.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreateUsers (20150727081137)
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
8
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150727081137"]]
|
9
|
+
[1m[35m (1.6ms)[0m commit transaction
|
10
|
+
Migrating to CreateCountries (20150727081314)
|
11
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "countries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
13
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150727081314"]]
|
14
|
+
[1m[35m (1.4ms)[0m commit transaction
|
15
|
+
Migrating to CreatePlaces (20150727081755)
|
16
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "places" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "country_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
18
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_places_on_country_id" ON "places" ("country_id")[0m
|
19
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150727081755"]]
|
20
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
21
|
+
Migrating to CreateVisits (20150727081827)
|
22
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "visits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "place_id" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
24
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_visits_on_place_id" ON "visits" ("place_id")
|
25
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26
|
+
FROM sqlite_master
|
27
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
28
|
+
UNION ALL
|
29
|
+
SELECT sql
|
30
|
+
FROM sqlite_temp_master
|
31
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
32
|
+
[0m
|
33
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_visits_on_user_id" ON "visits" ("user_id")
|
34
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150727081827"]]
|
35
|
+
[1m[35m (1.5ms)[0m commit transaction
|
36
|
+
Migrating to CreateProducts (20150727081904)
|
37
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
38
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
39
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150727081904"]]
|
40
|
+
[1m[35m (1.7ms)[0m commit transaction
|
41
|
+
Migrating to CreateActions (20150727081905)
|
42
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
43
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "actions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "visit_id" integer, "product_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
44
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_actions_on_visit_id" ON "actions" ("visit_id")[0m
|
45
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
46
|
+
FROM sqlite_master
|
47
|
+
WHERE name='index_actions_on_visit_id' AND type='index'
|
48
|
+
UNION ALL
|
49
|
+
SELECT sql
|
50
|
+
FROM sqlite_temp_master
|
51
|
+
WHERE name='index_actions_on_visit_id' AND type='index'
|
52
|
+
|
53
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_actions_on_product_id" ON "actions" ("product_id")[0m
|
54
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150727081905"]]
|
55
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
56
|
+
Migrating to CreateComments (20150727082016)
|
57
|
+
[1m[35m (0.1ms)[0m begin transaction
|
58
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commentable_id" integer, "commentable_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
59
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")
|
60
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150727082016"]]
|
61
|
+
[1m[35m (1.4ms)[0m commit transaction
|
62
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
63
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
64
|
+
FROM sqlite_master
|
65
|
+
WHERE name='index_actions_on_product_id' AND type='index'
|
66
|
+
UNION ALL
|
67
|
+
SELECT sql
|
68
|
+
FROM sqlite_temp_master
|
69
|
+
WHERE name='index_actions_on_product_id' AND type='index'
|
70
|
+
|
71
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
72
|
+
FROM sqlite_master
|
73
|
+
WHERE name='index_actions_on_visit_id' AND type='index'
|
74
|
+
UNION ALL
|
75
|
+
SELECT sql
|
76
|
+
FROM sqlite_temp_master
|
77
|
+
WHERE name='index_actions_on_visit_id' AND type='index'
|
78
|
+
[0m
|
79
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
80
|
+
FROM sqlite_master
|
81
|
+
WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
|
82
|
+
UNION ALL
|
83
|
+
SELECT sql
|
84
|
+
FROM sqlite_temp_master
|
85
|
+
WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
|
86
|
+
|
87
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
88
|
+
FROM sqlite_master
|
89
|
+
WHERE name='index_places_on_country_id' AND type='index'
|
90
|
+
UNION ALL
|
91
|
+
SELECT sql
|
92
|
+
FROM sqlite_temp_master
|
93
|
+
WHERE name='index_places_on_country_id' AND type='index'
|
94
|
+
[0m
|
95
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
96
|
+
FROM sqlite_master
|
97
|
+
WHERE name='index_visits_on_user_id' AND type='index'
|
98
|
+
UNION ALL
|
99
|
+
SELECT sql
|
100
|
+
FROM sqlite_temp_master
|
101
|
+
WHERE name='index_visits_on_user_id' AND type='index'
|
102
|
+
|
103
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
104
|
+
FROM sqlite_master
|
105
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
106
|
+
UNION ALL
|
107
|
+
SELECT sql
|
108
|
+
FROM sqlite_temp_master
|
109
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
110
|
+
[0m
|
@@ -0,0 +1,1437 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2
|
+
-----------------------------
|
3
|
+
EagerCountingTest: test_truth
|
4
|
+
-----------------------------
|
5
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
6
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "actions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "visit_id" integer, "product_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
7
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
8
|
+
[1m[36m (1.6ms)[0m [1mCREATE INDEX "index_actions_on_product_id" ON "actions" ("product_id")[0m
|
9
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
10
|
+
FROM sqlite_master
|
11
|
+
WHERE name='index_actions_on_product_id' AND type='index'
|
12
|
+
UNION ALL
|
13
|
+
SELECT sql
|
14
|
+
FROM sqlite_temp_master
|
15
|
+
WHERE name='index_actions_on_product_id' AND type='index'
|
16
|
+
|
17
|
+
[1m[36m (1.4ms)[0m [1mCREATE INDEX "index_actions_on_visit_id" ON "actions" ("visit_id")[0m
|
18
|
+
[1m[35m (1.8ms)[0m CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commentable_id" integer, "commentable_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
19
|
+
[1m[36m (1.5ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")[0m
|
20
|
+
[1m[35m (1.9ms)[0m CREATE TABLE "countries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
21
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "places" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "country_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
22
|
+
[1m[35m (1.5ms)[0m CREATE INDEX "index_places_on_country_id" ON "places" ("country_id")
|
23
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "products" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
24
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
25
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "visits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "place_id" integer, "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
26
|
+
[1m[35m (1.5ms)[0m CREATE INDEX "index_visits_on_place_id" ON "visits" ("place_id")
|
27
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
28
|
+
FROM sqlite_master
|
29
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
30
|
+
UNION ALL
|
31
|
+
SELECT sql
|
32
|
+
FROM sqlite_temp_master
|
33
|
+
WHERE name='index_visits_on_place_id' AND type='index'
|
34
|
+
[0m
|
35
|
+
[1m[35m (2.0ms)[0m CREATE INDEX "index_visits_on_user_id" ON "visits" ("user_id")
|
36
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
37
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
38
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
39
|
+
[1m[35m (1.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150727082016')
|
40
|
+
[1m[36m (2.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150727081137')[0m
|
41
|
+
[1m[35m (1.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150727081314')
|
42
|
+
[1m[36m (1.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150727081755')[0m
|
43
|
+
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150727081827')
|
44
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150727081904')[0m
|
45
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150727081905')
|
46
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
47
|
+
[1m[35m (0.1ms)[0m begin transaction
|
48
|
+
------------------------------------------------------------
|
49
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
50
|
+
------------------------------------------------------------
|
51
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
52
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 08:47:53.308271"], ["updated_at", "2015-07-27 08:47:53.308271"]]
|
53
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
54
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
55
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 08:47:53.311702"], ["updated_at", "2015-07-27 08:47:53.311702"]]
|
56
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
57
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
58
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 08:47:53.331525"], ["updated_at", "2015-07-27 08:47:53.331525"]]
|
59
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
60
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
61
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 08:47:53.333282"], ["updated_at", "2015-07-27 08:47:53.333282"]]
|
62
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
64
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 08:47:53.334657"], ["updated_at", "2015-07-27 08:47:53.334657"]]
|
65
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
66
|
+
[1m[35m (1.6ms)[0m rollback transaction
|
67
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
68
|
+
[1m[35m (0.1ms)[0m begin transaction
|
69
|
+
------------------------------------------------------------
|
70
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
71
|
+
------------------------------------------------------------
|
72
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
73
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 08:55:20.514776"], ["updated_at", "2015-07-27 08:55:20.514776"]]
|
74
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
75
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
76
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 08:55:20.517809"], ["updated_at", "2015-07-27 08:55:20.517809"]]
|
77
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
78
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
79
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 08:55:20.529874"], ["updated_at", "2015-07-27 08:55:20.529874"]]
|
80
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
81
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
82
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 08:55:20.531318"], ["updated_at", "2015-07-27 08:55:20.531318"]]
|
83
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
84
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
85
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 08:55:20.532470"], ["updated_at", "2015-07-27 08:55:20.532470"]]
|
86
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
87
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
88
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
89
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
90
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
91
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
92
|
+
[1m[35m (0.1ms)[0m begin transaction
|
93
|
+
-----------------------------------------------
|
94
|
+
EagerCountingTest: test_count_by_a_joined_model
|
95
|
+
-----------------------------------------------
|
96
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
97
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:01:29.655047"], ["updated_at", "2015-07-27 09:01:29.655047"]]
|
98
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
99
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
100
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:01:29.659346"], ["updated_at", "2015-07-27 09:01:29.659346"]]
|
101
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
102
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
103
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:01:29.672634"], ["updated_at", "2015-07-27 09:01:29.672634"]]
|
104
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
105
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
106
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:01:29.679322"], ["updated_at", "2015-07-27 09:01:29.679322"]]
|
107
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
108
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
109
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:01:29.681007"], ["updated_at", "2015-07-27 09:01:29.681007"]]
|
110
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
111
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
112
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:01:29.682373"], ["updated_at", "2015-07-27 09:01:29.682373"]]
|
113
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
114
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
115
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:01:29.683813"], ["updated_at", "2015-07-27 09:01:29.683813"]]
|
116
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
117
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
118
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:01:29.685249"], ["updated_at", "2015-07-27 09:01:29.685249"]]
|
119
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
120
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
121
|
+
[1m[35m (0.1ms)[0m begin transaction
|
122
|
+
------------------------------------------------------------
|
123
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
124
|
+
------------------------------------------------------------
|
125
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
126
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:01:29.696941"], ["updated_at", "2015-07-27 09:01:29.696941"]]
|
127
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
128
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
129
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:01:29.698324"], ["updated_at", "2015-07-27 09:01:29.698324"]]
|
130
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
131
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
132
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:01:29.700523"], ["updated_at", "2015-07-27 09:01:29.700523"]]
|
133
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
134
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
135
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:01:29.702153"], ["updated_at", "2015-07-27 09:01:29.702153"]]
|
136
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
137
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
138
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:01:29.703672"], ["updated_at", "2015-07-27 09:01:29.703672"]]
|
139
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
140
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
141
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
142
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
143
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
144
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
145
|
+
[1m[35m (0.1ms)[0m begin transaction
|
146
|
+
-----------------------------------------------
|
147
|
+
EagerCountingTest: test_count_by_a_joined_model
|
148
|
+
-----------------------------------------------
|
149
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
150
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:02:15.151667"], ["updated_at", "2015-07-27 09:02:15.151667"]]
|
151
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
152
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
153
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:02:15.156653"], ["updated_at", "2015-07-27 09:02:15.156653"]]
|
154
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
155
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
156
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:02:15.177629"], ["updated_at", "2015-07-27 09:02:15.177629"]]
|
157
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
158
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
159
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:02:15.184800"], ["updated_at", "2015-07-27 09:02:15.184800"]]
|
160
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
161
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
162
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:02:15.186568"], ["updated_at", "2015-07-27 09:02:15.186568"]]
|
163
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
164
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
165
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:02:15.187852"], ["updated_at", "2015-07-27 09:02:15.187852"]]
|
166
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
167
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
168
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:02:15.188992"], ["updated_at", "2015-07-27 09:02:15.188992"]]
|
169
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
170
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
171
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:02:15.190155"], ["updated_at", "2015-07-27 09:02:15.190155"]]
|
172
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
173
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
174
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
175
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
176
|
+
[1m[35m (0.1ms)[0m begin transaction
|
177
|
+
------------------------------------------------------------
|
178
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
179
|
+
------------------------------------------------------------
|
180
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
181
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:02:15.212742"], ["updated_at", "2015-07-27 09:02:15.212742"]]
|
182
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
183
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
184
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:02:15.214498"], ["updated_at", "2015-07-27 09:02:15.214498"]]
|
185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
186
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
187
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:02:15.216465"], ["updated_at", "2015-07-27 09:02:15.216465"]]
|
188
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
189
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
190
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:02:15.218381"], ["updated_at", "2015-07-27 09:02:15.218381"]]
|
191
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
192
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
193
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:02:15.219527"], ["updated_at", "2015-07-27 09:02:15.219527"]]
|
194
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
195
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
196
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
197
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
198
|
+
[1m[36m (1.7ms)[0m [1mrollback transaction[0m
|
199
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
200
|
+
[1m[35m (0.1ms)[0m begin transaction
|
201
|
+
------------------------------------------------------------
|
202
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
203
|
+
------------------------------------------------------------
|
204
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
205
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:02:33.672225"], ["updated_at", "2015-07-27 09:02:33.672225"]]
|
206
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
207
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
208
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:02:33.675161"], ["updated_at", "2015-07-27 09:02:33.675161"]]
|
209
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
210
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
211
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:02:33.685075"], ["updated_at", "2015-07-27 09:02:33.685075"]]
|
212
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
213
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
214
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:02:33.687166"], ["updated_at", "2015-07-27 09:02:33.687166"]]
|
215
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
216
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
217
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:02:33.688310"], ["updated_at", "2015-07-27 09:02:33.688310"]]
|
218
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
219
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
220
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
221
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
222
|
+
[1m[36m (1.8ms)[0m [1mrollback transaction[0m
|
223
|
+
[1m[35m (0.1ms)[0m begin transaction
|
224
|
+
-----------------------------------------------
|
225
|
+
EagerCountingTest: test_count_by_a_joined_model
|
226
|
+
-----------------------------------------------
|
227
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
228
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:02:33.707233"], ["updated_at", "2015-07-27 09:02:33.707233"]]
|
229
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
230
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
231
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:02:33.708723"], ["updated_at", "2015-07-27 09:02:33.708723"]]
|
232
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
233
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
234
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:02:33.716612"], ["updated_at", "2015-07-27 09:02:33.716612"]]
|
235
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
236
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
237
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:02:33.722956"], ["updated_at", "2015-07-27 09:02:33.722956"]]
|
238
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
239
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
240
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:02:33.724493"], ["updated_at", "2015-07-27 09:02:33.724493"]]
|
241
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
242
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
243
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:02:33.725673"], ["updated_at", "2015-07-27 09:02:33.725673"]]
|
244
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
245
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
246
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:02:33.726774"], ["updated_at", "2015-07-27 09:02:33.726774"]]
|
247
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
248
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
249
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:02:33.727848"], ["updated_at", "2015-07-27 09:02:33.727848"]]
|
250
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
251
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
252
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
253
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id[0m [["id", 1]]
|
254
|
+
[1m[35m (1.6ms)[0m rollback transaction
|
255
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
256
|
+
[1m[35m (0.1ms)[0m begin transaction
|
257
|
+
-----------------------------------------------
|
258
|
+
EagerCountingTest: test_count_by_a_joined_model
|
259
|
+
-----------------------------------------------
|
260
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
261
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:07:31.158537"], ["updated_at", "2015-07-27 09:07:31.158537"]]
|
262
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
263
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
264
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:07:31.161798"], ["updated_at", "2015-07-27 09:07:31.161798"]]
|
265
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
266
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
267
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:07:31.181418"], ["updated_at", "2015-07-27 09:07:31.181418"]]
|
268
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
269
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
270
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:07:31.189195"], ["updated_at", "2015-07-27 09:07:31.189195"]]
|
271
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
272
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
273
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:07:31.191024"], ["updated_at", "2015-07-27 09:07:31.191024"]]
|
274
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
275
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
276
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:07:31.192328"], ["updated_at", "2015-07-27 09:07:31.192328"]]
|
277
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
278
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
279
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:07:31.193460"], ["updated_at", "2015-07-27 09:07:31.193460"]]
|
280
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
281
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
282
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:07:31.194794"], ["updated_at", "2015-07-27 09:07:31.194794"]]
|
283
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
284
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
285
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
286
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
287
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
288
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
289
|
+
-------------------------------------------------------
|
290
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
291
|
+
-------------------------------------------------------
|
292
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
293
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:07:31.218028"], ["updated_at", "2015-07-27 09:07:31.218028"]]
|
294
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
295
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
296
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:07:31.219484"], ["updated_at", "2015-07-27 09:07:31.219484"]]
|
297
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
298
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
299
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:07:31.221303"], ["updated_at", "2015-07-27 09:07:31.221303"]]
|
300
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
301
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
302
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:07:31.222663"], ["updated_at", "2015-07-27 09:07:31.222663"]]
|
303
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
304
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
305
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:07:31.224249"], ["updated_at", "2015-07-27 09:07:31.224249"]]
|
306
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
307
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
308
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:07:31.225472"], ["updated_at", "2015-07-27 09:07:31.225472"]]
|
309
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
310
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
311
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 2], ["created_at", "2015-07-27 09:07:31.226579"], ["updated_at", "2015-07-27 09:07:31.226579"]]
|
312
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
313
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
314
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 2], ["created_at", "2015-07-27 09:07:31.227678"], ["updated_at", "2015-07-27 09:07:31.227678"]]
|
315
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
316
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
317
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 2], ["created_at", "2015-07-27 09:07:31.228825"], ["updated_at", "2015-07-27 09:07:31.228825"]]
|
318
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
319
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
320
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 3], ["created_at", "2015-07-27 09:07:31.229953"], ["updated_at", "2015-07-27 09:07:31.229953"]]
|
321
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
322
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
323
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:07:31.231062"], ["updated_at", "2015-07-27 09:07:31.231062"]]
|
324
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
325
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
326
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id [["id", 1]]
|
327
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
328
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
329
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
330
|
+
------------------------------------------------------------
|
331
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
332
|
+
------------------------------------------------------------
|
333
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
334
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:07:31.240954"], ["updated_at", "2015-07-27 09:07:31.240954"]]
|
335
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
336
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
337
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:07:31.242200"], ["updated_at", "2015-07-27 09:07:31.242200"]]
|
338
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
339
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
340
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:07:31.243884"], ["updated_at", "2015-07-27 09:07:31.243884"]]
|
341
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
342
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
343
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:07:31.245180"], ["updated_at", "2015-07-27 09:07:31.245180"]]
|
344
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
345
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
346
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 2], ["created_at", "2015-07-27 09:07:31.247667"], ["updated_at", "2015-07-27 09:07:31.247667"]]
|
347
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
348
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
349
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
350
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
351
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
352
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
353
|
+
[1m[35m (0.2ms)[0m begin transaction
|
354
|
+
------------------------------------------------------------
|
355
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
356
|
+
------------------------------------------------------------
|
357
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
358
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:15:46.018825"], ["updated_at", "2015-07-27 09:15:46.018825"]]
|
359
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
360
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
361
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:15:46.021733"], ["updated_at", "2015-07-27 09:15:46.021733"]]
|
362
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
363
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
364
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:15:46.032084"], ["updated_at", "2015-07-27 09:15:46.032084"]]
|
365
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
366
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
367
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:15:46.033683"], ["updated_at", "2015-07-27 09:15:46.033683"]]
|
368
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
369
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
370
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:15:46.034795"], ["updated_at", "2015-07-27 09:15:46.034795"]]
|
371
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
372
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
373
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
374
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
375
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
376
|
+
[1m[35m (0.1ms)[0m begin transaction
|
377
|
+
-------------------------------------------------------
|
378
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
379
|
+
-------------------------------------------------------
|
380
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
381
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:15:46.057209"], ["updated_at", "2015-07-27 09:15:46.057209"]]
|
382
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
383
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
384
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:15:46.060027"], ["updated_at", "2015-07-27 09:15:46.060027"]]
|
385
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
386
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
387
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:15:46.068009"], ["updated_at", "2015-07-27 09:15:46.068009"]]
|
388
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
389
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
390
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:15:46.069855"], ["updated_at", "2015-07-27 09:15:46.069855"]]
|
391
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
392
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
393
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:15:46.074835"], ["updated_at", "2015-07-27 09:15:46.074835"]]
|
394
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
395
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
396
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:15:46.076579"], ["updated_at", "2015-07-27 09:15:46.076579"]]
|
397
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
398
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
399
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:15:46.077976"], ["updated_at", "2015-07-27 09:15:46.077976"]]
|
400
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
401
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
402
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:15:46.079372"], ["updated_at", "2015-07-27 09:15:46.079372"]]
|
403
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
404
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
405
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", "2015-07-27 09:15:46.080689"], ["updated_at", "2015-07-27 09:15:46.080689"]]
|
406
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
407
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
408
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 3], ["created_at", "2015-07-27 09:15:46.082135"], ["updated_at", "2015-07-27 09:15:46.082135"]]
|
409
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
410
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
411
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:15:46.083814"], ["updated_at", "2015-07-27 09:15:46.083814"]]
|
412
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
413
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
414
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id[0m [["id", 1]]
|
415
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
416
|
+
[1m[36m (1.7ms)[0m [1mrollback transaction[0m
|
417
|
+
[1m[35m (0.1ms)[0m begin transaction
|
418
|
+
------------------------------------------------------------------------
|
419
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
420
|
+
------------------------------------------------------------------------
|
421
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
422
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:15:46.099083"], ["updated_at", "2015-07-27 09:15:46.099083"]]
|
423
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
424
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
425
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:15:46.100501"], ["updated_at", "2015-07-27 09:15:46.100501"]]
|
426
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
427
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
428
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:15:46.101635"], ["updated_at", "2015-07-27 09:15:46.101635"]]
|
429
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
430
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
431
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:15:46.102828"], ["updated_at", "2015-07-27 09:15:46.102828"]]
|
432
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
433
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
434
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:15:46.105158"], ["updated_at", "2015-07-27 09:15:46.105158"]]
|
435
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
436
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
437
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:15:46.106568"], ["updated_at", "2015-07-27 09:15:46.106568"]]
|
438
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
439
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
440
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:15:46.107680"], ["updated_at", "2015-07-27 09:15:46.107680"]]
|
441
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
442
|
+
[1m[35m (1.3ms)[0m rollback transaction
|
443
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
444
|
+
-----------------------------------------------
|
445
|
+
EagerCountingTest: test_count_by_a_joined_model
|
446
|
+
-----------------------------------------------
|
447
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
448
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:15:46.110751"], ["updated_at", "2015-07-27 09:15:46.110751"]]
|
449
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
450
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
451
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:15:46.112438"], ["updated_at", "2015-07-27 09:15:46.112438"]]
|
452
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
453
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
454
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:15:46.113916"], ["updated_at", "2015-07-27 09:15:46.113916"]]
|
455
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
456
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
457
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:15:46.115294"], ["updated_at", "2015-07-27 09:15:46.115294"]]
|
458
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
459
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
460
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:15:46.116682"], ["updated_at", "2015-07-27 09:15:46.116682"]]
|
461
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
462
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
463
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 2], ["created_at", "2015-07-27 09:15:46.118070"], ["updated_at", "2015-07-27 09:15:46.118070"]]
|
464
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
465
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
466
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 2], ["created_at", "2015-07-27 09:15:46.120068"], ["updated_at", "2015-07-27 09:15:46.120068"]]
|
467
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
468
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
469
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:15:46.121537"], ["updated_at", "2015-07-27 09:15:46.121537"]]
|
470
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
471
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
472
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id[0m [["id", 1]]
|
473
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
474
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
475
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
476
|
+
[1m[35m (0.1ms)[0m begin transaction
|
477
|
+
------------------------------------------------------------------------
|
478
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
479
|
+
------------------------------------------------------------------------
|
480
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
481
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:16:06.369914"], ["updated_at", "2015-07-27 09:16:06.369914"]]
|
482
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
483
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
484
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:16:06.373816"], ["updated_at", "2015-07-27 09:16:06.373816"]]
|
485
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
486
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
487
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:16:06.380943"], ["updated_at", "2015-07-27 09:16:06.380943"]]
|
488
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
489
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
490
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:16:06.382220"], ["updated_at", "2015-07-27 09:16:06.382220"]]
|
491
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
492
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
493
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:16:06.391755"], ["updated_at", "2015-07-27 09:16:06.391755"]]
|
494
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
495
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
496
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:16:06.393401"], ["updated_at", "2015-07-27 09:16:06.393401"]]
|
497
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
498
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
499
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:16:06.394531"], ["updated_at", "2015-07-27 09:16:06.394531"]]
|
500
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
501
|
+
[1m[35m (1.6ms)[0m rollback transaction
|
502
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
503
|
+
-----------------------------------------------
|
504
|
+
EagerCountingTest: test_count_by_a_joined_model
|
505
|
+
-----------------------------------------------
|
506
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
507
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:16:06.404383"], ["updated_at", "2015-07-27 09:16:06.404383"]]
|
508
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
509
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
510
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:16:06.408693"], ["updated_at", "2015-07-27 09:16:06.408693"]]
|
511
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
512
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
513
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:16:06.413996"], ["updated_at", "2015-07-27 09:16:06.413996"]]
|
514
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
515
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
516
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:16:06.416490"], ["updated_at", "2015-07-27 09:16:06.416490"]]
|
517
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
518
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
519
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:16:06.417809"], ["updated_at", "2015-07-27 09:16:06.417809"]]
|
520
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
521
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
522
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 2], ["created_at", "2015-07-27 09:16:06.418899"], ["updated_at", "2015-07-27 09:16:06.418899"]]
|
523
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
524
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
525
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 2], ["created_at", "2015-07-27 09:16:06.419968"], ["updated_at", "2015-07-27 09:16:06.419968"]]
|
526
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
527
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
528
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:16:06.421054"], ["updated_at", "2015-07-27 09:16:06.421054"]]
|
529
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
530
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
531
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id[0m [["id", 1]]
|
532
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id
|
533
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
534
|
+
[1m[35m (0.1ms)[0m begin transaction
|
535
|
+
-------------------------------------------------------
|
536
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
537
|
+
-------------------------------------------------------
|
538
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
539
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:16:06.441525"], ["updated_at", "2015-07-27 09:16:06.441525"]]
|
540
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
541
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
542
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:16:06.443135"], ["updated_at", "2015-07-27 09:16:06.443135"]]
|
543
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
544
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
545
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:16:06.445166"], ["updated_at", "2015-07-27 09:16:06.445166"]]
|
546
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
547
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
548
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:16:06.446652"], ["updated_at", "2015-07-27 09:16:06.446652"]]
|
549
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
550
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
551
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:16:06.448043"], ["updated_at", "2015-07-27 09:16:06.448043"]]
|
552
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
553
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
554
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:16:06.449242"], ["updated_at", "2015-07-27 09:16:06.449242"]]
|
555
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
556
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
557
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:16:06.451224"], ["updated_at", "2015-07-27 09:16:06.451224"]]
|
558
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
559
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
560
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:16:06.452464"], ["updated_at", "2015-07-27 09:16:06.452464"]]
|
561
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
562
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
563
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", "2015-07-27 09:16:06.453667"], ["updated_at", "2015-07-27 09:16:06.453667"]]
|
564
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
565
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
566
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 3], ["created_at", "2015-07-27 09:16:06.454888"], ["updated_at", "2015-07-27 09:16:06.454888"]]
|
567
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
568
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
569
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:16:06.456140"], ["updated_at", "2015-07-27 09:16:06.456140"]]
|
570
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
571
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
572
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id[0m [["id", 1]]
|
573
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
574
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
575
|
+
[1m[35m (0.1ms)[0m begin transaction
|
576
|
+
------------------------------------------------------------
|
577
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
578
|
+
------------------------------------------------------------
|
579
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
580
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:16:06.466124"], ["updated_at", "2015-07-27 09:16:06.466124"]]
|
581
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
582
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
583
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:16:06.467389"], ["updated_at", "2015-07-27 09:16:06.467389"]]
|
584
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
585
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
586
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:16:06.469183"], ["updated_at", "2015-07-27 09:16:06.469183"]]
|
587
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
588
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
589
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:16:06.470969"], ["updated_at", "2015-07-27 09:16:06.470969"]]
|
590
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
591
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
592
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:16:06.473574"], ["updated_at", "2015-07-27 09:16:06.473574"]]
|
593
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
594
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
595
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
596
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
597
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
598
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
599
|
+
[1m[35m (0.1ms)[0m begin transaction
|
600
|
+
------------------------------------------------------------
|
601
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
602
|
+
------------------------------------------------------------
|
603
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
604
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:17:06.209437"], ["updated_at", "2015-07-27 09:17:06.209437"]]
|
605
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
606
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
607
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:17:06.213688"], ["updated_at", "2015-07-27 09:17:06.213688"]]
|
608
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
609
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
610
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:17:06.226148"], ["updated_at", "2015-07-27 09:17:06.226148"]]
|
611
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
612
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
613
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:17:06.228029"], ["updated_at", "2015-07-27 09:17:06.228029"]]
|
614
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
615
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
616
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:17:06.229372"], ["updated_at", "2015-07-27 09:17:06.229372"]]
|
617
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
618
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
619
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
620
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
621
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
622
|
+
[1m[35m (0.1ms)[0m begin transaction
|
623
|
+
-------------------------------------------------------
|
624
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
625
|
+
-------------------------------------------------------
|
626
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
627
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:17:06.247678"], ["updated_at", "2015-07-27 09:17:06.247678"]]
|
628
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
629
|
+
[1m[35m (0.2ms)[0m SAVEPOINT active_record_1
|
630
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:17:06.250642"], ["updated_at", "2015-07-27 09:17:06.250642"]]
|
631
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
632
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
633
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:17:06.263968"], ["updated_at", "2015-07-27 09:17:06.263968"]]
|
634
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
635
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
636
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:17:06.266044"], ["updated_at", "2015-07-27 09:17:06.266044"]]
|
637
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
638
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
639
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:17:06.270727"], ["updated_at", "2015-07-27 09:17:06.270727"]]
|
640
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
641
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
642
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:17:06.273286"], ["updated_at", "2015-07-27 09:17:06.273286"]]
|
643
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
644
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
645
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:17:06.274908"], ["updated_at", "2015-07-27 09:17:06.274908"]]
|
646
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
647
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
648
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:17:06.276393"], ["updated_at", "2015-07-27 09:17:06.276393"]]
|
649
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
650
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
651
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", "2015-07-27 09:17:06.278116"], ["updated_at", "2015-07-27 09:17:06.278116"]]
|
652
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
653
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
654
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 3], ["created_at", "2015-07-27 09:17:06.279774"], ["updated_at", "2015-07-27 09:17:06.279774"]]
|
655
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
656
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
657
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:17:06.281215"], ["updated_at", "2015-07-27 09:17:06.281215"]]
|
658
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
659
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
660
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id[0m [["id", 1]]
|
661
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
662
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
663
|
+
[1m[35m (0.1ms)[0m begin transaction
|
664
|
+
-----------------------------------------------
|
665
|
+
EagerCountingTest: test_count_by_a_joined_model
|
666
|
+
-----------------------------------------------
|
667
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
668
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:17:06.293642"], ["updated_at", "2015-07-27 09:17:06.293642"]]
|
669
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
670
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
671
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:17:06.295052"], ["updated_at", "2015-07-27 09:17:06.295052"]]
|
672
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
673
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
674
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:17:06.296474"], ["updated_at", "2015-07-27 09:17:06.296474"]]
|
675
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
676
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
677
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:17:06.297881"], ["updated_at", "2015-07-27 09:17:06.297881"]]
|
678
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
679
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
680
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:17:06.299463"], ["updated_at", "2015-07-27 09:17:06.299463"]]
|
681
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
682
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
683
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:17:06.300818"], ["updated_at", "2015-07-27 09:17:06.300818"]]
|
684
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
685
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
686
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:17:06.302005"], ["updated_at", "2015-07-27 09:17:06.302005"]]
|
687
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
688
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
689
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:17:06.303788"], ["updated_at", "2015-07-27 09:17:06.303788"]]
|
690
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
691
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
692
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
693
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
694
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
695
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
696
|
+
------------------------------------------------------------------------
|
697
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
698
|
+
------------------------------------------------------------------------
|
699
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
700
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:17:06.313950"], ["updated_at", "2015-07-27 09:17:06.313950"]]
|
701
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
702
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
703
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:17:06.315480"], ["updated_at", "2015-07-27 09:17:06.315480"]]
|
704
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
705
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
706
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:17:06.316827"], ["updated_at", "2015-07-27 09:17:06.316827"]]
|
707
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
708
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
709
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:17:06.317868"], ["updated_at", "2015-07-27 09:17:06.317868"]]
|
710
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
711
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
712
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:17:06.320241"], ["updated_at", "2015-07-27 09:17:06.320241"]]
|
713
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
714
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
715
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:17:06.321765"], ["updated_at", "2015-07-27 09:17:06.321765"]]
|
716
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
717
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
718
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:17:06.322967"], ["updated_at", "2015-07-27 09:17:06.322967"]]
|
719
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
720
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id[0m
|
721
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products" WHERE "products"."id" = ?) GROUP BY actions.product_id [["id", 1]]
|
722
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id[0m
|
723
|
+
[1m[35m (1.6ms)[0m rollback transaction
|
724
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
725
|
+
[1m[35m (0.1ms)[0m begin transaction
|
726
|
+
------------------------------------------------------------------------
|
727
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
728
|
+
------------------------------------------------------------------------
|
729
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
730
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.466195"], ["updated_at", "2015-07-27 09:29:15.466195"]]
|
731
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
732
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
733
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.469363"], ["updated_at", "2015-07-27 09:29:15.469363"]]
|
734
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
735
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
736
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.476530"], ["updated_at", "2015-07-27 09:29:15.476530"]]
|
737
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
738
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
739
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.478105"], ["updated_at", "2015-07-27 09:29:15.478105"]]
|
740
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
741
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
742
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:29:15.487665"], ["updated_at", "2015-07-27 09:29:15.487665"]]
|
743
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
744
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
745
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:29:15.489111"], ["updated_at", "2015-07-27 09:29:15.489111"]]
|
746
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
747
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
748
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:29:15.490446"], ["updated_at", "2015-07-27 09:29:15.490446"]]
|
749
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
750
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
751
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products" WHERE "products"."id" = ?) GROUP BY actions.product_id[0m [["id", 1]]
|
752
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
753
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
754
|
+
[1m[35m (0.1ms)[0m begin transaction
|
755
|
+
-------------------------------------------------------
|
756
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
757
|
+
-------------------------------------------------------
|
758
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
759
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.516420"], ["updated_at", "2015-07-27 09:29:15.516420"]]
|
760
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
761
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
762
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.520009"], ["updated_at", "2015-07-27 09:29:15.520009"]]
|
763
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
764
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
765
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:29:15.527462"], ["updated_at", "2015-07-27 09:29:15.527462"]]
|
766
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
767
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
768
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:29:15.529400"], ["updated_at", "2015-07-27 09:29:15.529400"]]
|
769
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
770
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
771
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:29:15.530779"], ["updated_at", "2015-07-27 09:29:15.530779"]]
|
772
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
773
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
774
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:29:15.532279"], ["updated_at", "2015-07-27 09:29:15.532279"]]
|
775
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
776
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
777
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:29:15.534203"], ["updated_at", "2015-07-27 09:29:15.534203"]]
|
778
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
779
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
780
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:29:15.535497"], ["updated_at", "2015-07-27 09:29:15.535497"]]
|
781
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
782
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
783
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", "2015-07-27 09:29:15.536556"], ["updated_at", "2015-07-27 09:29:15.536556"]]
|
784
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
785
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
786
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 3], ["created_at", "2015-07-27 09:29:15.537661"], ["updated_at", "2015-07-27 09:29:15.537661"]]
|
787
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
788
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
789
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:29:15.538720"], ["updated_at", "2015-07-27 09:29:15.538720"]]
|
790
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
791
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
792
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id[0m [["id", 1]]
|
793
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
794
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
795
|
+
[1m[35m (0.1ms)[0m begin transaction
|
796
|
+
------------------------------------------------------------
|
797
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
798
|
+
------------------------------------------------------------
|
799
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
800
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.550545"], ["updated_at", "2015-07-27 09:29:15.550545"]]
|
801
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
802
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
803
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.553556"], ["updated_at", "2015-07-27 09:29:15.553556"]]
|
804
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
805
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
806
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:29:15.556138"], ["updated_at", "2015-07-27 09:29:15.556138"]]
|
807
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
808
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
809
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:29:15.557489"], ["updated_at", "2015-07-27 09:29:15.557489"]]
|
810
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
811
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
812
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:29:15.558595"], ["updated_at", "2015-07-27 09:29:15.558595"]]
|
813
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
814
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
815
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
816
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
817
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
818
|
+
[1m[35m (0.1ms)[0m begin transaction
|
819
|
+
-----------------------------------------------
|
820
|
+
EagerCountingTest: test_count_by_a_joined_model
|
821
|
+
-----------------------------------------------
|
822
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
823
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.565296"], ["updated_at", "2015-07-27 09:29:15.565296"]]
|
824
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
825
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
826
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.566828"], ["updated_at", "2015-07-27 09:29:15.566828"]]
|
827
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
828
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
829
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:15.568397"], ["updated_at", "2015-07-27 09:29:15.568397"]]
|
830
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
831
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
832
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:29:15.569630"], ["updated_at", "2015-07-27 09:29:15.569630"]]
|
833
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
834
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
835
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:15.570814"], ["updated_at", "2015-07-27 09:29:15.570814"]]
|
836
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
837
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
838
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:29:15.571959"], ["updated_at", "2015-07-27 09:29:15.571959"]]
|
839
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
840
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
841
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:29:15.573183"], ["updated_at", "2015-07-27 09:29:15.573183"]]
|
842
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
843
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
844
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:29:15.574680"], ["updated_at", "2015-07-27 09:29:15.574680"]]
|
845
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
846
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
847
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
848
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
849
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
850
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
851
|
+
---------------------------------------------------------------
|
852
|
+
EagerCountingTest: test_count_by_polymorphicly_associated_model
|
853
|
+
---------------------------------------------------------------
|
854
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
855
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:15.585744"], ["updated_at", "2015-07-27 09:29:15.585744"]]
|
856
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
857
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
858
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:15.590782"], ["updated_at", "2015-07-27 09:29:15.590782"]]
|
859
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
860
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
861
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
862
|
+
[1m[35m (0.1ms)[0m begin transaction
|
863
|
+
------------------------------------------------------------
|
864
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
865
|
+
------------------------------------------------------------
|
866
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
867
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:35.906498"], ["updated_at", "2015-07-27 09:29:35.906498"]]
|
868
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
869
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
870
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:35.910140"], ["updated_at", "2015-07-27 09:29:35.910140"]]
|
871
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
872
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
873
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:29:35.925226"], ["updated_at", "2015-07-27 09:29:35.925226"]]
|
874
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
875
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
876
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:29:35.926707"], ["updated_at", "2015-07-27 09:29:35.926707"]]
|
877
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
878
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
879
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:29:35.927756"], ["updated_at", "2015-07-27 09:29:35.927756"]]
|
880
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
881
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
882
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
883
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
884
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
885
|
+
[1m[35m (0.1ms)[0m begin transaction
|
886
|
+
-------------------------------------------------------
|
887
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
888
|
+
-------------------------------------------------------
|
889
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
890
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:35.945159"], ["updated_at", "2015-07-27 09:29:35.945159"]]
|
891
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
892
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
893
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:35.947913"], ["updated_at", "2015-07-27 09:29:35.947913"]]
|
894
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
895
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
896
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:29:35.959769"], ["updated_at", "2015-07-27 09:29:35.959769"]]
|
897
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
898
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
899
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 1], ["created_at", "2015-07-27 09:29:35.961668"], ["updated_at", "2015-07-27 09:29:35.961668"]]
|
900
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
901
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
902
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 1], ["created_at", "2015-07-27 09:29:35.965878"], ["updated_at", "2015-07-27 09:29:35.965878"]]
|
903
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
904
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
905
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:29:35.967272"], ["updated_at", "2015-07-27 09:29:35.967272"]]
|
906
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
907
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
908
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:29:35.968587"], ["updated_at", "2015-07-27 09:29:35.968587"]]
|
909
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
910
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
911
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:29:35.969881"], ["updated_at", "2015-07-27 09:29:35.969881"]]
|
912
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
913
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
914
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", "2015-07-27 09:29:35.970976"], ["updated_at", "2015-07-27 09:29:35.970976"]]
|
915
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
916
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
917
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 3], ["created_at", "2015-07-27 09:29:35.972059"], ["updated_at", "2015-07-27 09:29:35.972059"]]
|
918
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
919
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
920
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 3], ["created_at", "2015-07-27 09:29:35.973127"], ["updated_at", "2015-07-27 09:29:35.973127"]]
|
921
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
922
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
923
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id[0m [["id", 1]]
|
924
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id
|
925
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
926
|
+
[1m[35m (0.1ms)[0m begin transaction
|
927
|
+
------------------------------------------------------------------------
|
928
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
929
|
+
------------------------------------------------------------------------
|
930
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
931
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:35.987694"], ["updated_at", "2015-07-27 09:29:35.987694"]]
|
932
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
933
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
934
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:35.989026"], ["updated_at", "2015-07-27 09:29:35.989026"]]
|
935
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
936
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
937
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:35.990319"], ["updated_at", "2015-07-27 09:29:35.990319"]]
|
938
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
939
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
940
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:35.991447"], ["updated_at", "2015-07-27 09:29:35.991447"]]
|
941
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
942
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
943
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:29:35.993087"], ["updated_at", "2015-07-27 09:29:35.993087"]]
|
944
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
945
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
946
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:29:35.994770"], ["updated_at", "2015-07-27 09:29:35.994770"]]
|
947
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
948
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
949
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:29:35.995909"], ["updated_at", "2015-07-27 09:29:35.995909"]]
|
950
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
951
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
952
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products" WHERE "products"."id" = ?) GROUP BY actions.product_id[0m [["id", 1]]
|
953
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
954
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
955
|
+
[1m[35m (0.1ms)[0m begin transaction
|
956
|
+
-----------------------------------------------
|
957
|
+
EagerCountingTest: test_count_by_a_joined_model
|
958
|
+
-----------------------------------------------
|
959
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
960
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:36.002645"], ["updated_at", "2015-07-27 09:29:36.002645"]]
|
961
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
962
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
963
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:36.004122"], ["updated_at", "2015-07-27 09:29:36.004122"]]
|
964
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
965
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
966
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:36.005732"], ["updated_at", "2015-07-27 09:29:36.005732"]]
|
967
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
968
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
969
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:29:36.006921"], ["updated_at", "2015-07-27 09:29:36.006921"]]
|
970
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
971
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
972
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:36.008010"], ["updated_at", "2015-07-27 09:29:36.008010"]]
|
973
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
974
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
975
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:29:36.009061"], ["updated_at", "2015-07-27 09:29:36.009061"]]
|
976
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
977
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
978
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:29:36.010107"], ["updated_at", "2015-07-27 09:29:36.010107"]]
|
979
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
980
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
981
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:29:36.011129"], ["updated_at", "2015-07-27 09:29:36.011129"]]
|
982
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
983
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
984
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
985
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
986
|
+
[1m[35m (2.0ms)[0m rollback transaction
|
987
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
988
|
+
---------------------------------------------------------------
|
989
|
+
EagerCountingTest: test_count_by_polymorphicly_associated_model
|
990
|
+
---------------------------------------------------------------
|
991
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
992
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:36.020239"], ["updated_at", "2015-07-27 09:29:36.020239"]]
|
993
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
994
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
995
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:36.021648"], ["updated_at", "2015-07-27 09:29:36.021648"]]
|
996
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
997
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
998
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:36.032533"], ["updated_at", "2015-07-27 09:29:36.032533"]]
|
999
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1000
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1001
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:36.034092"], ["updated_at", "2015-07-27 09:29:36.034092"]]
|
1002
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1003
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1004
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 2], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:36.035466"], ["updated_at", "2015-07-27 09:29:36.035466"]]
|
1005
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1006
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
1007
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1008
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1009
|
+
------------------------------------------------------------------------
|
1010
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
1011
|
+
------------------------------------------------------------------------
|
1012
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1013
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.403050"], ["updated_at", "2015-07-27 09:29:57.403050"]]
|
1014
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1015
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1016
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.406276"], ["updated_at", "2015-07-27 09:29:57.406276"]]
|
1017
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1018
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1019
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.413165"], ["updated_at", "2015-07-27 09:29:57.413165"]]
|
1020
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1021
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1022
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.414436"], ["updated_at", "2015-07-27 09:29:57.414436"]]
|
1023
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1024
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1025
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 09:29:57.424067"], ["updated_at", "2015-07-27 09:29:57.424067"]]
|
1026
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1027
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1028
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 09:29:57.425609"], ["updated_at", "2015-07-27 09:29:57.425609"]]
|
1029
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1030
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1031
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 09:29:57.426729"], ["updated_at", "2015-07-27 09:29:57.426729"]]
|
1032
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1033
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
1034
|
+
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products" WHERE "products"."id" = ?) GROUP BY actions.product_id[0m [["id", 1]]
|
1035
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id
|
1036
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
1037
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1038
|
+
------------------------------------------------------------
|
1039
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
1040
|
+
------------------------------------------------------------
|
1041
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1042
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.454691"], ["updated_at", "2015-07-27 09:29:57.454691"]]
|
1043
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1044
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1045
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.456115"], ["updated_at", "2015-07-27 09:29:57.456115"]]
|
1046
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1047
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1048
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 09:29:57.458038"], ["updated_at", "2015-07-27 09:29:57.458038"]]
|
1049
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1050
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1051
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 09:29:57.459326"], ["updated_at", "2015-07-27 09:29:57.459326"]]
|
1052
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1053
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1054
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 2], ["created_at", "2015-07-27 09:29:57.460836"], ["updated_at", "2015-07-27 09:29:57.460836"]]
|
1055
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1056
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
1057
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id[0m [["id", 1]]
|
1058
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id
|
1059
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
1060
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1061
|
+
-----------------------------------------------
|
1062
|
+
EagerCountingTest: test_count_by_a_joined_model
|
1063
|
+
-----------------------------------------------
|
1064
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1065
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.471392"], ["updated_at", "2015-07-27 09:29:57.471392"]]
|
1066
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1067
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1068
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.472851"], ["updated_at", "2015-07-27 09:29:57.472851"]]
|
1069
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1070
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1071
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:57.474590"], ["updated_at", "2015-07-27 09:29:57.474590"]]
|
1072
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1073
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1074
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:29:57.476463"], ["updated_at", "2015-07-27 09:29:57.476463"]]
|
1075
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1076
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1077
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:57.478753"], ["updated_at", "2015-07-27 09:29:57.478753"]]
|
1078
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1079
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1080
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 09:29:57.480314"], ["updated_at", "2015-07-27 09:29:57.480314"]]
|
1081
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1082
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1083
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 09:29:57.481516"], ["updated_at", "2015-07-27 09:29:57.481516"]]
|
1084
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1085
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1086
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:29:57.482790"], ["updated_at", "2015-07-27 09:29:57.482790"]]
|
1087
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1088
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
1089
|
+
[1m[35m (0.5ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
1090
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
1091
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
1092
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1093
|
+
-------------------------------------------------------
|
1094
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
1095
|
+
-------------------------------------------------------
|
1096
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1097
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.496812"], ["updated_at", "2015-07-27 09:29:57.496812"]]
|
1098
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1099
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1100
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.498077"], ["updated_at", "2015-07-27 09:29:57.498077"]]
|
1101
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1102
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1103
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 09:29:57.499841"], ["updated_at", "2015-07-27 09:29:57.499841"]]
|
1104
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1105
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1106
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 09:29:57.501229"], ["updated_at", "2015-07-27 09:29:57.501229"]]
|
1107
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1108
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1109
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 09:29:57.502434"], ["updated_at", "2015-07-27 09:29:57.502434"]]
|
1110
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1111
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1112
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 09:29:57.504099"], ["updated_at", "2015-07-27 09:29:57.504099"]]
|
1113
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1114
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1115
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 2], ["created_at", "2015-07-27 09:29:57.505414"], ["updated_at", "2015-07-27 09:29:57.505414"]]
|
1116
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1117
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1118
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 2], ["created_at", "2015-07-27 09:29:57.506578"], ["updated_at", "2015-07-27 09:29:57.506578"]]
|
1119
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1120
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1121
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 2], ["created_at", "2015-07-27 09:29:57.507683"], ["updated_at", "2015-07-27 09:29:57.507683"]]
|
1122
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1123
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1124
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 3], ["created_at", "2015-07-27 09:29:57.508743"], ["updated_at", "2015-07-27 09:29:57.508743"]]
|
1125
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1126
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1127
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 09:29:57.509829"], ["updated_at", "2015-07-27 09:29:57.509829"]]
|
1128
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1129
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
1130
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id [["id", 1]]
|
1131
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
1132
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
1133
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1134
|
+
---------------------------------------------------------------
|
1135
|
+
EagerCountingTest: test_count_by_polymorphicly_associated_model
|
1136
|
+
---------------------------------------------------------------
|
1137
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1138
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 09:29:57.516858"], ["updated_at", "2015-07-27 09:29:57.516858"]]
|
1139
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1140
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1141
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 09:29:57.519037"], ["updated_at", "2015-07-27 09:29:57.519037"]]
|
1142
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1143
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1144
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:57.525911"], ["updated_at", "2015-07-27 09:29:57.525911"]]
|
1145
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1146
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1147
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:57.528121"], ["updated_at", "2015-07-27 09:29:57.528121"]]
|
1148
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1149
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1150
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 2], ["commentable_type", "Place"], ["created_at", "2015-07-27 09:29:57.529822"], ["updated_at", "2015-07-27 09:29:57.529822"]]
|
1151
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1152
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places") GROUP BY comments.commentable_id[0m
|
1153
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY comments.commentable_id [["id", 1]]
|
1154
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places") GROUP BY comments.commentable_id[0m
|
1155
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
1156
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1157
|
+
------------------------------------------------------------
|
1158
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
1159
|
+
------------------------------------------------------------
|
1160
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1161
|
+
[1m[36mSQL (4.0ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1162
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1163
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1164
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1165
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1166
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1167
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at", "user_id") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["user_id", 1]]
|
1168
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1169
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1170
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("created_at", "updated_at", "user_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["user_id", 1]]
|
1171
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1172
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1173
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at", "user_id") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["user_id", 2]]
|
1174
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1175
|
+
[1m[36m (1.6ms)[0m [1mrollback transaction[0m
|
1176
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1177
|
+
-------------------------------------------------------
|
1178
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
1179
|
+
-------------------------------------------------------
|
1180
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1181
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1182
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1183
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1184
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1186
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1187
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1188
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1189
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1190
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 1], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1191
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1192
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1193
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 1]]
|
1194
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1195
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1196
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1197
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1198
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1199
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 2], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1200
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1201
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1202
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 2]]
|
1203
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1204
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1205
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 2], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1206
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1207
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1208
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 3], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1209
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1210
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1211
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 3]]
|
1212
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1213
|
+
[1m[35m (1.3ms)[0m rollback transaction
|
1214
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1215
|
+
-----------------------------------------------
|
1216
|
+
EagerCountingTest: test_count_by_a_joined_model
|
1217
|
+
-----------------------------------------------
|
1218
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1219
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1220
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1221
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1222
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1223
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1224
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1225
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 1], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1226
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1227
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1228
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 1]]
|
1229
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1230
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1231
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 1], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1232
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1233
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1234
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 2]]
|
1235
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1236
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1237
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "visits" ("created_at", "place_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["place_id", 2], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1238
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1239
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1240
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "actions" ("created_at", "updated_at", "visit_id") VALUES (?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 3]]
|
1241
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1242
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
1243
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1244
|
+
------------------------------------------------------------------------
|
1245
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
1246
|
+
------------------------------------------------------------------------
|
1247
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1248
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1249
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1250
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1251
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1252
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1253
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1254
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1255
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1256
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1257
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1258
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1259
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1260
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "actions" ("created_at", "product_id", "updated_at", "visit_id") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["product_id", 1], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 1]]
|
1261
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1262
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1263
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("created_at", "product_id", "updated_at", "visit_id") VALUES (?, ?, ?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["product_id", 2], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 1]]
|
1264
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1265
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1266
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("created_at", "product_id", "updated_at", "visit_id") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["product_id", 1], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["visit_id", 2]]
|
1267
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1268
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
1269
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1270
|
+
---------------------------------------------------------------
|
1271
|
+
EagerCountingTest: test_count_by_polymorphicly_associated_model
|
1272
|
+
---------------------------------------------------------------
|
1273
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1274
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1275
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1276
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1277
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1278
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1279
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1280
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1281
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1282
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1283
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1284
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1285
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1286
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commentable_id", 2], ["commentable_type", "Place"], ["created_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00], ["updated_at", Mon, 27 Jul 2015 11:22:38 UTC +00:00]]
|
1287
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1288
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
1289
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1290
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1291
|
+
-----------------------------------------------
|
1292
|
+
EagerCountingTest: test_count_by_a_joined_model
|
1293
|
+
-----------------------------------------------
|
1294
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1295
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.851387"], ["updated_at", "2015-07-27 11:27:07.851387"]]
|
1296
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1297
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1298
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.856127"], ["updated_at", "2015-07-27 11:27:07.856127"]]
|
1299
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1300
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1301
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 11:27:07.870990"], ["updated_at", "2015-07-27 11:27:07.870990"]]
|
1302
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1303
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1304
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 11:27:07.880616"], ["updated_at", "2015-07-27 11:27:07.880616"]]
|
1305
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1306
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1307
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 11:27:07.882416"], ["updated_at", "2015-07-27 11:27:07.882416"]]
|
1308
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1309
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1310
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 2], ["created_at", "2015-07-27 11:27:07.884161"], ["updated_at", "2015-07-27 11:27:07.884161"]]
|
1311
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1312
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1313
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 2], ["created_at", "2015-07-27 11:27:07.886996"], ["updated_at", "2015-07-27 11:27:07.886996"]]
|
1314
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1315
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1316
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 11:27:07.891327"], ["updated_at", "2015-07-27 11:27:07.891327"]]
|
1317
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1318
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
1319
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY visits.place_id [["id", 1]]
|
1320
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.place_id AS visits_place_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" WHERE "visits"."place_id" IN (SELECT "places"."id" FROM "places") GROUP BY visits.place_id[0m
|
1321
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
1322
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1323
|
+
-------------------------------------------------------
|
1324
|
+
EagerCountingTest: test_count_by_a_distant_joined_model
|
1325
|
+
-------------------------------------------------------
|
1326
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1327
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.916126"], ["updated_at", "2015-07-27 11:27:07.916126"]]
|
1328
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1329
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1330
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "countries" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.917688"], ["updated_at", "2015-07-27 11:27:07.917688"]]
|
1331
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1332
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1333
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 1], ["created_at", "2015-07-27 11:27:07.920747"], ["updated_at", "2015-07-27 11:27:07.920747"]]
|
1334
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1335
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1336
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 1], ["created_at", "2015-07-27 11:27:07.922745"], ["updated_at", "2015-07-27 11:27:07.922745"]]
|
1337
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1338
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1339
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 1], ["created_at", "2015-07-27 11:27:07.924460"], ["updated_at", "2015-07-27 11:27:07.924460"]]
|
1340
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1341
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1342
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?) [["country_id", 1], ["created_at", "2015-07-27 11:27:07.925922"], ["updated_at", "2015-07-27 11:27:07.925922"]]
|
1343
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1344
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1345
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["place_id", 2], ["created_at", "2015-07-27 11:27:07.927209"], ["updated_at", "2015-07-27 11:27:07.927209"]]
|
1346
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1347
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1348
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?) [["visit_id", 2], ["created_at", "2015-07-27 11:27:07.928558"], ["updated_at", "2015-07-27 11:27:07.928558"]]
|
1349
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1350
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1351
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "places" ("country_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["country_id", 2], ["created_at", "2015-07-27 11:27:07.929857"], ["updated_at", "2015-07-27 11:27:07.929857"]]
|
1352
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1353
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1354
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("place_id", "created_at", "updated_at") VALUES (?, ?, ?) [["place_id", 3], ["created_at", "2015-07-27 11:27:07.931058"], ["updated_at", "2015-07-27 11:27:07.931058"]]
|
1355
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1356
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1357
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["visit_id", 3], ["created_at", "2015-07-27 11:27:07.932264"], ["updated_at", "2015-07-27 11:27:07.932264"]]
|
1358
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1359
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
1360
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY places.country_id [["id", 1]]
|
1361
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, places.country_id AS places_country_id FROM "actions" INNER JOIN "visits" ON "visits"."id" = "actions"."visit_id" INNER JOIN "places" ON "places"."id" = "visits"."place_id" WHERE "places"."country_id" IN (SELECT "countries"."id" FROM "countries") GROUP BY places.country_id[0m
|
1362
|
+
[1m[35m (1.5ms)[0m rollback transaction
|
1363
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1364
|
+
---------------------------------------------------------------
|
1365
|
+
EagerCountingTest: test_count_by_polymorphicly_associated_model
|
1366
|
+
---------------------------------------------------------------
|
1367
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1368
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.939699"], ["updated_at", "2015-07-27 11:27:07.939699"]]
|
1369
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1370
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1371
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "places" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.941251"], ["updated_at", "2015-07-27 11:27:07.941251"]]
|
1372
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1373
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1374
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 11:27:07.947335"], ["updated_at", "2015-07-27 11:27:07.947335"]]
|
1375
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1376
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1377
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commentable_id", 1], ["commentable_type", "Place"], ["created_at", "2015-07-27 11:27:07.949287"], ["updated_at", "2015-07-27 11:27:07.949287"]]
|
1378
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1379
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1380
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "comments" ("commentable_id", "commentable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commentable_id", 2], ["commentable_type", "Place"], ["created_at", "2015-07-27 11:27:07.950515"], ["updated_at", "2015-07-27 11:27:07.950515"]]
|
1381
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1382
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places") GROUP BY comments.commentable_id[0m
|
1383
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places" WHERE "places"."id" = ?) GROUP BY comments.commentable_id [["id", 1]]
|
1384
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, comments.commentable_id AS comments_commentable_id FROM "comments" WHERE "comments"."commentable_type" = 'Place' AND "comments"."commentable_id" IN (SELECT "places"."id" FROM "places") GROUP BY comments.commentable_id[0m
|
1385
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
1386
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1387
|
+
------------------------------------------------------------------------
|
1388
|
+
EagerCountingTest: test_count_by_a_via_has_many_association_joined_model
|
1389
|
+
------------------------------------------------------------------------
|
1390
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1391
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.963792"], ["updated_at", "2015-07-27 11:27:07.963792"]]
|
1392
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1393
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1394
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "products" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.965275"], ["updated_at", "2015-07-27 11:27:07.965275"]]
|
1395
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1396
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1397
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.966565"], ["updated_at", "2015-07-27 11:27:07.966565"]]
|
1398
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1399
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1400
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "visits" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.967772"], ["updated_at", "2015-07-27 11:27:07.967772"]]
|
1401
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1402
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1403
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 1], ["product_id", 1], ["created_at", "2015-07-27 11:27:07.970386"], ["updated_at", "2015-07-27 11:27:07.970386"]]
|
1404
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1405
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1406
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["visit_id", 1], ["product_id", 2], ["created_at", "2015-07-27 11:27:07.972734"], ["updated_at", "2015-07-27 11:27:07.972734"]]
|
1407
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1408
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1409
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "actions" ("visit_id", "product_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["visit_id", 2], ["product_id", 1], ["created_at", "2015-07-27 11:27:07.974211"], ["updated_at", "2015-07-27 11:27:07.974211"]]
|
1410
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1411
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id[0m
|
1412
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products" WHERE "products"."id" = ?) GROUP BY actions.product_id [["id", 1]]
|
1413
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, actions.product_id AS actions_product_id FROM "visits" INNER JOIN "actions" ON "actions"."visit_id" = "visits"."id" WHERE "actions"."product_id" IN (SELECT "products"."id" FROM "products") GROUP BY actions.product_id[0m
|
1414
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
1415
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1416
|
+
------------------------------------------------------------
|
1417
|
+
EagerCountingTest: test_count_by_a_directly_associated_model
|
1418
|
+
------------------------------------------------------------
|
1419
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1420
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2015-07-27 11:27:07.986004"], ["updated_at", "2015-07-27 11:27:07.986004"]]
|
1421
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1422
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1423
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2015-07-27 11:27:07.987411"], ["updated_at", "2015-07-27 11:27:07.987411"]]
|
1424
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1425
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1426
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 1], ["created_at", "2015-07-27 11:27:07.989960"], ["updated_at", "2015-07-27 11:27:07.989960"]]
|
1427
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1428
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1429
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?) [["user_id", 1], ["created_at", "2015-07-27 11:27:07.991405"], ["updated_at", "2015-07-27 11:27:07.991405"]]
|
1430
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1431
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1432
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "visits" ("user_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["user_id", 2], ["created_at", "2015-07-27 11:27:07.993176"], ["updated_at", "2015-07-27 11:27:07.993176"]]
|
1433
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1434
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
1435
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users" WHERE "users"."id" = ?) GROUP BY visits.user_id [["id", 1]]
|
1436
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) AS count_all, visits.user_id AS visits_user_id FROM "visits" WHERE "visits"."user_id" IN (SELECT "users"."id" FROM "users") GROUP BY visits.user_id[0m
|
1437
|
+
[1m[35m (1.5ms)[0m rollback transaction
|