Re: [GENERAL] Comparing epoch to timestamp - Mailing list pgsql-general

From Alexander Farber
Subject Re: [GENERAL] Comparing epoch to timestamp
Date
Msg-id CAADeyWhiMFo+Ayv2fzWbZfkPi+97LLpzQR3koMAaXv2KgzL_Dw@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Comparing epoch to timestamp  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: [GENERAL] Comparing epoch to timestamp  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
Sorry, I probably had to call:

# EXPLAIN SELECT ARRAY_AGG(hashed)                                                                                                                      FROM words_nouns                                                                                                                                              WHERE EXTRACT(EPOCH FROM added) > 0                                                                                                                           UNION                                                                                                                                                         SELECT ARRAY_AGG(hashed)                                                                                                                                      FROM words_verbs                                                                                                                                              WHERE EXTRACT(EPOCH FROM added) > 0                                                                                                                           ;
                                         QUERY PLAN                                          
---------------------------------------------------------------------------------------------
 Unique  (cost=2707.03..2707.04 rows=2 width=32)
   ->  Sort  (cost=2707.03..2707.03 rows=2 width=32)
         Sort Key: (array_agg(words_nouns.hashed))
         ->  Append  (cost=1740.53..2707.02 rows=2 width=32)
               ->  Aggregate  (cost=1740.53..1740.54 rows=1 width=32)
                     ->  Seq Scan on words_nouns  (cost=0.00..1684.66 rows=22348 width=32)
                           Filter: (date_part('epoch'::text, added) > '0'::double precision)
               ->  Aggregate  (cost=966.45..966.46 rows=1 width=32)
                     ->  Seq Scan on words_verbs  (cost=0.00..936.05 rows=12157 width=32)
                           Filter: (date_part('epoch'::text, added) > '0'::double precision)
(10 rows)

but still not sure if this statement is ok performancewise...

Regards
Alex

pgsql-general by date:

Previous
From: Aron Widforss
Date:
Subject: Re: [GENERAL] Fwd: SPI_palloc problem
Next
From: rakeshkumar464
Date:
Subject: [GENERAL] starting PG command line options vs postgresql.con