Associative array fragmentation?
From: Christoph <cruepprich_at_gmail.com>
Date: Mon, 16 Apr 2012 10:23:17 -0500
Message-ID: <CAJdEiBrEHt+ZZbc6nF09b5MdV+_kFkRePj60UfsjhLPM04QoeQ_at_mail.gmail.com>
I have a large associative array (index-by pl/sql table), that is indexed by varchar2. A procedure that uses this array deletes and adds array elements over and over again. Will this cause memory fragmentation which can cause performance issues? Is there a way for me to see this fragmentation?
Here is a short example of what I'm talking about. Imagine this type of thing done with hundreds or thousands of array elements:
Date: Mon, 16 Apr 2012 10:23:17 -0500
Message-ID: <CAJdEiBrEHt+ZZbc6nF09b5MdV+_kFkRePj60UfsjhLPM04QoeQ_at_mail.gmail.com>
I have a large associative array (index-by pl/sql table), that is indexed by varchar2. A procedure that uses this array deletes and adds array elements over and over again. Will this cause memory fragmentation which can cause performance issues? Is there a way for me to see this fragmentation?
Here is a short example of what I'm talking about. Imagine this type of thing done with hundreds or thousands of array elements:
DECLARE
TYPE t_tbl IS TABLE OF VARCHAR(1) INDEX BY VARCHAR2(1);
l_tbl t_tbl;
BEGIN
l_tbl('a') := 1; l_tbl('b') := 2; l_tbl('c') := 3;
l_tbl.delete('b');
l_tbl('e') := 4;
END;
Thanks,
Christoph
http://ruepprich.wordpress.com
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Apr 16 2012 - 10:23:17 CDT