• Looks like it was cached with @P_UNIT_TYPE = 'VEH' (runs 7 seconds).

    With all other parameter values it runs 2.5 minutes now.

    I tried "WITH RECOMPILE" to clear cache but nothing changed.

    7 seconds with 'VEH' - 2.5 min with all other values.

    I attached all indexes from [prj_detail] table.