title: How can I know big O notation from EXPLAIN (ANALYZE) in PostgreSQL
body: <p>this is an EXPLAIN (ANALYZE) from PostgreSQL</p>
  
  <pre><code>GroupAggregate  (cost=245.73..292.69 rows=1174 width=46) (actual time=38.850..39.454 rows=148 loops=1)
    Group Key: location_id, (date_trunc('day'::text, created_at)), payment_method
    -&gt;  Sort  (cost=245.73..248.66 rows=1174 width=42) (actual time=38.829..38.916 rows=1100 loops=1)
          Sort Key: location_id, (date_trunc('day'::text, created_at)), payment_method
          Sort Method: quicksort  Memory: 165kB
          -&gt;  Seq Scan on payment p  (cost=0.00..185.87 rows=1174 width=42) (actual time=1.905..6.849 rows=1100 loops=1)
                Filter: ((location_id IS NOT NULL) AND (created_at &lt;= '2019-04-23 00:00:00+00'::timestamp with time zone) AND (created_at &gt;= '2000-04-23 00:00:00+00'::timestamp with time zone) AND ((entity_type)::text = 'RESERVATION'::text) AND ((payment_status)::text = ANY ('{SUCCESS,CAPTURE,REFUNDED}'::text[])))
                Rows Removed by Filter: 2238
  Planning Time: 1.895 ms
  Execution Time: 39.727 ms
  </code></pre>
  
  <p>This is my query code</p>
  
  <pre><code>select  p.location_id,
          date_trunc('day', p.created_at) as date,
          p.payment_method,
          count(p.id), sum(p.sub_amount)+sum(p.mdr_fee)+sum(p.convenience_fee) as GrossSales,
          sum(p.sub_amount) netSales
  from payment p
  where p.location_id is not null
    and p.entity_type = 'RESERVATION'
    and p.payment_status in ('SUCCESS','CAPTURE','REFUNDED')
    and created_at &lt;= '2019-04-23'
    and created_at &gt;= '2000-04-23'
  group by p.location_id, date, p.payment_method
  order by p.location_id asc, date asc, p.payment_method;
  </code></pre>
  
  <p>I don't know how to see the big O notation EXPLAIN (ANALYZE).</p>