mboegem:
which table is the dr_id based on? I see no correlation name (not really needed if it only exist in one of 2 tables, but still… could be a future show stopper)
further on I’d say that the ‘dr.fc_fabric_key IS NOT NULL’ doesn’t really do much, wouldn’t it be a better constrain on the primary table? (fc.fc_id is not null)
hope this helps
Thanks Marc - dr_id is only in one table.
Tried your suggestion for selecting fc_id as null - but same results.
It almost appears that the getDataSetByQuery is not performing the last part of the sql string??? Sounds crazy but appears to be the case even though the stats show the query running?
Total Time (mm:ss:ms) Count Avg Time (mm:ss:ms) Type Action
00:00:016 1 00:00:016 Custom select dr_id from fabric_condition fc, drawings_register dr where fc.fc_id = dr.fc_fabric_key AND fc.fc_id IS NOT NULL
00:00:000 1 00:00:000 Load foundset select top 11 count(1) as n from drawings_register
00:00:000 3 00:00:000 Load foundset select top 201 dr_id from drawings_register order by dr_id asc
00:00:000 2 00:00:000 Load foundset select top 31 dr_id, fc_fabric_key, cd_id, cc_id, ci_id, dr_drawno from drawings_register where dr_id in (?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
00:00:000 2 00:00:000 Relation select top 61 fc_id, cd_id, cc_id, fc_flag_for_inspection, fc_main1, fc_main2, fc_access, fc_action, fc_application_method, br_rule, cm_complexity, fc_cost_code, fc_ex_extent, fc_extent_num, fc_program_year_basic, fc_program_year, fi_insulation_fabric_system1, fi_insulation_fabric_system2, fi_insulation_fabric_system3, fp_paint_fabric_system1, fp_paint_fabric_system2, fp_paint_fabric_system3, bs_insulation_removal, fc_insulation_thickness, fc_insulation_type, fc_rec_maint_yr, fc_access_group, fc_name_of_surveyor, fc_scfm, fc_scfm_dec, fc_safety_factor, fc_surface_preparation_required, fc_temp_units, fc_year_by_hand, fc_year_by_hand_yn, cladding_type, fc_year_calculated, fc_date, fc_importdate, fc_date_last_maint, fc_per_complete, fc_update_y_n, fc_standard_prep_y_n, fc_date_last_yearend, fc_env_conditions, fc_paint_temp_coating, fc_base_year1, fc_last_base_reset_user, fc_last_base_reset_date, fc_last_base_reset_reason, fc_patch_repair, fc_not_prog_complete, fc_area, fc_description, fc_ccr_value, fc_diameter, cd_service_code, fc_measued_area, rc_orientation, fc_record_no_user_input, fc_linearyn, fc_elevation, fc_notes, ad_analysis_code, fc_sub_mat_type_link, cd_complex, cd_plant, fc_user_tag_1, fc_user_tag_2, fc_user_tag_3, fc_area_link, fc_haz_env, fc_corro_zone, fc_calced_area, fc_calced_area_ext, fc_downgrade_grit_scfm, fc_downgrade_grit_ext, fc_downgrade_hptc_scfm, fc_downgrade_hptc_ext, yearendselect, fc_marked_deleted, fc_marked_deleted_by, fc_marked_deleted_date, fc_scfm_changed_by_hand, fc_scfm_changed_by_hand_date, fc_spare1, fc_spare2, fc_spare3, fc_spare4, fc_year_last_reset, fc_year_by_hand_changed_by, fc_year_by_hand_changed_date, fc_hist_coating_type, fc_hist_thickness, fc_hist_expected_life, fc_hist_compatibility, fc_hist_blasted, fc_hist_date_applied, fc_qra_int, fc_qra_ext, fc_job_pack_id, fc_job_pack_description from fabric_condition where fc_id = ? order by fc_id asc