Hello,
I am trying to use Vertica in clickstream analysis scenario and i need to make sure am using Vertica in the right way!
I am having Vertica installed on two "r3.4xlarge" AWS instances w/ 8 disks each configured as RAID 0 and having 10 GB of raw data which is very small compared to how much data size Vertica is supposed to handle i guess.
I have one anchor table with many dimensions e.g. account, app, date, time (0-23), country, region, operator, device, platform, manufacturer and many facts such as requests, impressions, ,clicks, and conversions.
i have two deployed projections proposed by the database designer, and i am trying to use Vertica to execute queries of varying dimensions and of varying orders aggregated on a daily, weekly and monthly basis, however when i execute the following daily aggregated query:
SELECT app, date as dayno, countryid, operatorid, regionid, deviceid, platformid, manufacturerid, sum(requests) , sum(impressions) , sum(clicks), sum(conversions)
FROM fact_stat
WHERE date >= '2014-10-01' and date <= '2014-10-30' and accountid = 99999
GROUP BY app, dayno, countryid, operatorid, regionid, deviceid, platformid, manufacturerid
ORDER BY app, dayno, countryid, operatorid, regionid, deviceid, platformid, manufacturerid,
LIMIT 10 offset 0;
It takes up to 11 seconds to execute! while weekly aggregation takes up to 3 second. Is there anything i can do to optimize performance, given that # of dimensions might increase and their order might vary.
Below is the Query Plan:
-------------------------------
Access Path: +-SELECT LIMIT 10 [Cost: 565K, Rows: 10] (PATH ID: 0)
| Output Only: 10 tuples
| Execute on: Query Initiator
| +---> GROUPBY HASH (SORT OUTPUT) (LOCAL RESEGMENT GROUPS) [Cost: 565K, Rows: 482] (PATH ID: 2)
| | Aggregates: sum(fact_stat.Requests), sum(fact_stat.Impressions), sum(fact_stat.Clicks), sum(fact_stat.Conversions)
| | Group By: fact_stat.AppSiteId, fact_stat.DateId, fact_stat.CountryId, fact_stat.OperatorId, fact_stat.RegionId, fact_stat.DeviceId, fact_stat.PlatformId
, fact_stat.ManufacturerId
| | Execute on: All Nodes
| | +---> STORAGE ACCESS for fact_stat [Cost: 511K, Rows: 42M] (PATH ID: 3)
| | | Projection: public.fact_stat_DBD_1_seg_test3_b0
| | | Materialize: fact_stat.DateId, fact_stat.AppSiteId, fact_stat.CountryId, fact_stat.OperatorId, fact_stat.RegionId, fact_stat.DeviceId, fact_stat.Platf
ormId, fact_stat.ManufacturerId, fact_stat.Requests, fact_stat.Impressions, fact_stat.Clicks, fact_stat.Conversions
| | | Filter: (fact_stat.AccountId = 99999)
| | | Filter: ((fact_stat.DateId >= '2014-10-01'::date) AND (fact_stat.DateId <= '2014-10-30'::date))
| | | Execute on: All Nodes
-------------------------------
Thank you
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
to solve nearly every use case. I will have to choose few queries that can be optimized through a small set of projections or LAP.