Search This Blog

2011-06-30

Hacking Genesys OCM Backend Queries

Product: Genesys
Component: Outbound Contact Manager

When clicking on a calling list from Genesys Outbound Contact Manager (OCM) GUI, following are the queries executed

Calling List Table Name: CL_Table_1

SELECT count(*) FROM OCS.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CL_Table_1' AND TABLE_TYPE = 'VIEW'
SELECT count(*) FROM OCS.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'CL_Table_1' AND TABLE_TYPE = 'BASE TABLE'
SELECT count(*) FROM sysindexes WHERE name='CL_Table_1_recstat_idx'
SELECT COUNT(*) FROM CL_Table_1
SELECT COUNT(DISTINCT chain_id) FROM CL_Table_1
SELECT * FROM #list WHERE 1=2
If above statement failed, then it auto create table
TRUNCATE TABLE #list
INSERT INTO #list (record_id) SELECT record_id FROM CL_Table_1
SELECT l.record_id,l.contact_info,l.contact_info_type,l.record_type,l.record_status,l.call_result,l.attempt,l.dial_sched_time,l.call_time,l.daily_from,l.daily_till,l.tz_dbid,l.campaign_id,l.agent_id,l.chain_id,l.chain_n,l.group_id,l.app_id,l.treatments,l.media_ref,l.email_subject,l.email_template_id,l.switch_id,l.Title,l.FirstName,...

This is useful for database performance tuning, such as creating suitable index

No comments: