Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Records : 4716225 ( ~5 million records )
- Size on disk : ~ 500 MB
- db.flights.stats()
- Execution Time: 1 ms
- GroupAggregate (cost=40.69..7646.54 rows=1 width=8) (actual time=0.743..0.743 rows=1 loops=1)
- Output: flightnum, count(*)
- -> Bitmap Heap Scan on public.flights (cost=40.69..7638.85 rows=1535 width=8) (actual time=0.179..0.594 rows=382 loops=1)
- Output: id, year, month, dayofmonth, dayofweek, deptime, crsdeptime, arrtime, crsarrtime, uniquecarrier, flightnum, tailnum, actualelapsedtime, crselapsedtime, airtime, arrdelay, depdelay, origin, dest, distance, taxiin, taxiout, cancelled, cancell (...)
- Recheck Cond: (flights.flightnum = 1489)
- Filter: ((flights.year >= 1987) AND (flights.dayofweek >= 1) AND (flights.dayofweek <= 5))
- Rows Removed by Filter: 158
- -> Bitmap Index Scan on flightnum_index (cost=0.00..40.31 rows=2117 width=0) (actual time=0.160..0.160 rows=540 loops=1)
- Index Cond: (flights.flightnum = 1489)
- db.flights.group({key: {"FlightNum": 1},cond: {"Year": {$gte:1987}, "DayOfWeek": {$gte:1, $lte:5}, "FlightNum": 1489},reduce: function(curr, result){ result.total +=1 },initial:{total:0}})
- Execution Time: 20 ms
- db.flights.mapReduce(
- function() { emit(this.FlightNum, this.total); },
- function(key, values) { return values+1 },
- {
- query: {"Year": {$gte:1987}, "DayOfWeek": {$gte:1, $lte:5}, "FlightNum": 1489 },
- out: "total"
- }
- )
- {
- "result" : "total",
- "timeMillis" : 152, <——
- "counts" : {
- "input" : 382,
- "emit" : 382,
- "reduce" : 4,
- "output" : 1
- },
- "ok" : 1,
- }
- Execution Time: 152 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement