Thanks Tom.
I've created index on aid, date:
create index aaa on stats.feed_sub(aid,date);
and simplified a query (dropped gran as it's equal for all rows anyway):
SELECT
sum(stats.feed_sub.c_filt_click_cap_ip) AS clicks_from_ip,
sum(stats.feed_sub.c_filt_doubleclick) AS clicks_on_target,
trafdev writes:
> CREATE INDEX ix_feed_sub_date
>ON stats.feed_sub
>USING brin
>(date);
> CREATE UNIQUE INDEX ixu_feed_sub
>ON stats.feed_sub
>USING btree
>(date, gran, aid, pid, sid, fid, subid COLLATE pg_catalog."default");
> HashAggregate (cost=901171.72..912354.97 ro
Hi.
I'm trying to build an OLAP-oriented DB based on PostgresSQL.
User works with a paginated report in the web-browser. Interface allows
to fetch data for a custom date-range selection,
display individual rows (20-50 per page) and totals (for entire
selection, even not visible on the current