日期:2014-05-17 浏览次数:20835 次
DECLARE IN_COMMUNITY_NAME VARCHAR2(200); IN_STANDARD_ADDR_NAME VARCHAR2(200); IN_PROD_SPEC_ID NUMBER; IN_BUSINESS_TYPE VARCHAR2(200); IN_USER_TYPE NUMBER; IN_AREA_ID NUMBER; IN_CONDITION_TYPE VARCHAR2(200); IN_BEGIN_ROW NUMBER; IN_END_ROW NUMBER; OUT_ATTRS RMS.PG_RMS_FOR_CRM_NEW.c_list; OUT_ROW_COUNT NUMBER; OUT_RET_CODE VARCHAR2(200); OUT_RET_INFO VARCHAR2(200); v_community_state number; v_gpon_not_rsc_spec varchar2(200); v_ocn_not_rsc_spec varchar2(200); V_OUT_ROW_COUNT number; v_start number; BEGIN IN_COMMUNITY_NAME := '%田林十四村二期%'; IN_STANDARD_ADDR_NAME := '%路%'; IN_PROD_SPEC_ID := ''; IN_BUSINESS_TYPE := 'FixPhone'; IN_USER_TYPE := 1; IN_AREA_ID := 15; IN_CONDITION_TYPE := '0'; IN_BEGIN_ROW := 1; IN_END_ROW := 100; v_community_state := 4; v_ocn_not_rsc_spec := '10304200'; v_gpon_not_rsc_spec := '10102007'; v_start := dbms_utility.get_time; select count(1) into v_out_row_count from regional_loc rl,regional_loc_2_community rl2c,community c where rl.geography_loc_id = rl2c.geography_loc_id and rl2c.community_id = c.community_id and rl.display_type_cd = 1 and c.status = 4 and rl.description like IN_STANDARD_ADDR_NAME and c.name like IN_COMMUNITY_NAME and rl.regional_simple_spell like '%%' and c.community_simple_spell like '%%' and rl.user_type_id in ( 1 ,3) and c.rsc_spec_id <> v_ocn_not_rsc_spec and c.rsc_spec_id <> v_gpon_not_rsc_spec and rl.area_id = 15 ; DBMS_OUTPUT.PUT_LINE('OUT_ROW_COUNT = ' || v_out_row_count); dbms_output.put_line('time = ' || (dbms_utility.get_time - v_start) * 10); END;
consistent gets 15218
------解决方案--------------------