Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. Records : 4716225 ( ~5 million records )
  2. Size on disk : ~ 500 MB
  3.  
  4. db.flights.stats()
  5.  
  6. Execution Time: 1 ms
  7.  
  8.  
  9.  
  10. GroupAggregate (cost=40.69..7646.54 rows=1 width=8) (actual time=0.743..0.743 rows=1 loops=1)
  11. Output: flightnum, count(*)
  12. -> 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)
  13. 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 (...)
  14. Recheck Cond: (flights.flightnum = 1489)
  15. Filter: ((flights.year >= 1987) AND (flights.dayofweek >= 1) AND (flights.dayofweek <= 5))
  16. Rows Removed by Filter: 158
  17. -> 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)
  18. Index Cond: (flights.flightnum = 1489)
  19.  
  20. 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}})
  21.  
  22. Execution Time: 20 ms
  23.  
  24. db.flights.mapReduce(
  25. function() { emit(this.FlightNum, this.total); },
  26. function(key, values) { return values+1 },
  27. {
  28. query: {"Year": {$gte:1987}, "DayOfWeek": {$gte:1, $lte:5}, "FlightNum": 1489 },
  29. out: "total"
  30. }
  31. )
  32.  
  33. {
  34.  
  35. "result" : "total",
  36. "timeMillis" : 152, <——
  37. "counts" : {
  38. "input" : 382,
  39. "emit" : 382,
  40. "reduce" : 4,
  41. "output" : 1
  42. },
  43. "ok" : 1,
  44. }
  45.  
  46.  
  47. Execution Time: 152 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement