Back

SQL Explained

Executed SQL
EXPLAIN SELECT ••• "bdex_campaign"."id" FROM "bdex_campaign" WHERE ("bdex_campaign"."starts_at" <= '2017-04-21 20:06:54.459363' AND "bdex_campaign"."ends_at" > '2017-04-21 20:06:54.459363' AND "bdex_campaign"."editorial_state" = 160 ) ORDER BY "bdex_campaign"."starts_at" DESC, "bdex_campaign"."ordering" ASC
Time
3.07 ms
Database
default
QUERY PLAN
Sort (cost=789.79..789.80 rows=1 width=16)
Sort Key: starts_at DESC, ordering
-> Seq Scan on bdex_campaign (cost=0.00..789.78 rows=1 width=16)
Filter: ((starts_at <= '2017-04-21 20:06:54.459363+08'::timestamp with time zone) AND (ends_at > '2017-04-21 20:06:54.459363+08'::timestamp with time zone) AND (editorial_state = 160))