Skip to content

Optimize PL/iSQL package dependency cleanup #1426

Open

Description

@Z95-cmyk

Problem

PL/iSQL package cleanup repeatedly scans dependency lists while ordering packages and finding non-package dependents. With many cached packages, repeated linear list operations make DISCARD PACKAGE unnecessarily expensive.

This was found during a source audit rather than from a reported production incident. It is most relevant to migrated schemas with hundreds or thousands of interdependent packages and sessions that reset package state. A generated reverse-order dependency chain is intentionally a synthetic worst case.

Expected outcome

  • reduce dependency sorting and dependent-function discovery to expected O(V + E) work
  • preserve the existing stable ordering and cycle/fallback semantics
  • add regression coverage for layered, independent, and cyclic package dependencies
  • include a reproducible benchmark script that isolates DISCARD PACKAGE timing and supports multiple package counts

Activity

  1. jiaoshuntian commented on Sep 24, 2026

    @jiaoshuntian
    Collaborator

    thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions