This way it would be much easier to get a quick glimpse at what we are the most interested in, rather than going to VDAD stat or whatever.
A few questions- where would be the best place to get the number of calls, with status SALE?
I was thinking of something like
- Code: Select all
select count(*) from vicidial_agent_log where status = 'SALE' and event_time > '2009-01-09 00:00:00';
1. Is this the correct choice?
vicidial_agent_log seems rather big (our is ~900 000 records for the last 3 months), so I guess querying it every second or so would impact negatively the DB performance.
2. Is the above statement correct?
3. If yes- how about creating a separate table- vicidial_sales with two columns- number_of_sales | campaign_id, and run a perl script in crontab, say every 5 or 10 minutes, which gathers info from vicidial_agent_log and puts it in vicidial_sales. Thus AST_timeonVDADall.php will be getting sales number from a very small table.
Is this a better approach?
Thanks in advance.