Created
February 22, 2014 09:41
-
-
Save d108/9151242 to your computer and use it in GitHub Desktop.
Query Plan After GROUP BY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
"Interval".end_time, | |
"MeterData".meter_name, | |
"Reading".channel | |
FROM | |
"MeterData" | |
INNER JOIN "IntervalReadData" ON "MeterData".meter_data_id = "IntervalReadData".meter_data_id | |
INNER JOIN "Interval" ON "IntervalReadData".interval_read_data_id = "Interval".interval_read_data_id | |
INNER JOIN "Reading" ON "Interval".interval_id = "Reading".interval_id | |
GROUP BY | |
"MeterData".meter_name, | |
"Interval".end_time, | |
"Reading".channel | |
-- Query Plan: | |
Group (cost=3697562.93..3869105.86 rows=17154293 width=19) | |
-> Sort (cost=3697562.93..3740448.66 rows=17154293 width=19) | |
Sort Key: "MeterData".meter_name, "Interval".end_time, "Reading".channel | |
-> Hash Join (cost=399095.74..1284498.39 rows=17154293 width=19) | |
Hash Cond: ("Reading".interval_id = "Interval".interval_id) | |
-> Seq Scan on "Reading" (cost=0.00..307110.93 rows=17154293 width=10) | |
-> Hash (cost=268306.51..268306.51 rows=6764018 width=25) | |
-> Hash Join (cost=567.97..268306.51 rows=6764018 width=25) | |
Hash Cond: ("Interval".interval_read_data_id = "IntervalReadData".interval_read_data_id) | |
-> Seq Scan on "Interval" (cost=0.00..132458.18 rows=6764018 width=24) | |
-> Hash (cost=487.42..487.42 rows=6444 width=17) | |
-> Hash Join (cost=235.10..487.42 rows=6444 width=17) | |
Hash Cond: ("IntervalReadData".meter_data_id = "MeterData".meter_data_id) | |
-> Seq Scan on "IntervalReadData" (cost=0.00..123.44 rows=6444 width=16) | |
-> Hash (cost=154.49..154.49 rows=6449 width=17) | |
-> Seq Scan on "MeterData" (cost=0.00..154.49 rows=6449 width=17) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment