Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added queries on the 'public' schema to count and view EAS addresses created by latest Bulk Loader batch

...

  1. Find the change_request_id of the most recent bulk load.

    Code Block
    languagesql
    -- Get the change_request_id of the most recent bulk load:
    SELECT change_request_id
    FROM public.change_requests
    WHERE requestor_comment LIKE 'bulk load change request'
    ORDER BY change_request_id DESC
    LIMIT 1;
    
    -- Make note of this id for the queries in the subsequent steps.


  2. Count and view new base addresses associated with the change request.

    Code Block
    languagesql
    -- Count new base addresses
    SELECT COUNT (*)
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here
    AND unit_num IS NULL
    
    -- View new base addresses
    SELECT *
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here
    AND unit_num IS NULL.


  3. Count and view new unit addresses associated with the change request.

    Code Block
    languagesql
    --- Count new unit addresses
    SELECT COUNT (*)
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here
    AND NOT unit_num IS NULL
    
    -- View new unit addresses
    SELECT *
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here
    AND NOT unit_num IS NULL


  4. Count and view all new addresses associated with the change request.

    Code Block
    languagesql
    -- Count all new addresses
    SELECT COUNT (*)
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here
    
    -- View all new addresses
    SELECT COUNT (*)
    FROM public.addresses
    WHERE activate_change_request_id = change_request_id_goes_here


Free space after large Bulk Loader batches

...