Обсуждение: A QUESTION ABOUT evaluation of two-dimensional Associative Arrays

Поиск
Список
Период
Сортировка

A QUESTION ABOUT evaluation of two-dimensional Associative Arrays

От
"superzhangfei"
Дата:

Hello

This is Robin.

I'm learning about the package of Enterprisedb.

I wrote a package like:
CREATE OR REPLACE PACKAGE BODY pkg_test_d2
IS


TYPE t_d2_tab IS TABLE OF integer INDEX BY integer;
TYPE t_d2_arr IS TABLE OF t_d2_tab INDEX BY integer;

v_D2_Value t_d2_arr;
v_D2_Max integer DEFAULT 0;


PROCEDURE xxx(INOUT xxxx) IS
BEGIN
  ...
  cnt := 1;
  LOOP
   cnt := cnt + 1;
  IF XXX

   v_D2_Value(v_D2_Max)(cnt) := 0;
   END IF;
   ....
  
  

But it can not be excused.
I modified v_D2_Value(v_D2_Max)(cnt)  to v_D2_Value[v_D2_Max][cnt].
So it can be load in to database.
When the package be excused,an error occured.

I need a way to give a value to the variable v_D2_Value  directly,which like v_D2_Value(v_D2_Max)(cnt) := 0  .

Could you give me some advice please?

 

Best Regards

Re: A QUESTION ABOUT evaluation of two-dimensional Associative Arrays

От
BladeOfLight16
Дата:
On Tue, Aug 27, 2013 at 9:24 AM, superzhangfei <superzhangfei@aliyun.com> wrote:
When the package be excused,an error occured.

Hello. First, can you reproduce the error without the PACKAGE? As in just CREATE TYPE and CREATE PROCEDURE statements? If so, what are the errors?

And I think you mean "executed" instead of "excused".

How to find out unused indexes?

От
"ascot.moss@gmail.com"
Дата:
Hi,

Can you please advise how to find out all unused indexes in PG?

regards


Re: How to find out unused indexes?

От
Raghavendra
Дата:
On Tue, Sep 3, 2013 at 11:36 AM, ascot.moss@gmail.com <ascot.moss@gmail.com> wrote:
Hi,

Can you please advise how to find out all unused indexes in PG?

regards

Below wiki link should help; under "Unused Index" section:


---
Regards,
Raghavendra
EnterpriseDB Corporation
 

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: How to find out unused indexes?

От
Abdul Sayeed
Дата:
Hi,

Below query can be handy to find unused indexes.

select indexrelname from pg_stat_user_indexes where idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0 ;

Hope it helps.



Thanks & Regards,
Abdul Sayeed
EnterpriseDB Corporation - RDBA Team
The Postgres Database Company

Office:  +1-732-931-7033/+91-20-305-89510
Fax: +91-20-30589502
Skype: abdul.sayeed24

EnterpriseDB Blog : http://blogs.enterprisedb.com
Follow us on Twitter : http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution,retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.


On Tue, Sep 3, 2013 at 12:14 PM, Raghavendra <raghavendra.rao@enterprisedb.com> wrote:
On Tue, Sep 3, 2013 at 11:36 AM, ascot.moss@gmail.com <ascot.moss@gmail.com> wrote:
Hi,

Can you please advise how to find out all unused indexes in PG?

regards

Below wiki link should help; under "Unused Index" section:


---
Regards,
Raghavendra
EnterpriseDB Corporation
 

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: How to find out unused indexes?

От
"ascot.moss@gmail.com"
Дата:
Thanks.

how about  the case as follows?

idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0, but
idx_blks_read is not 0 and idx_blks_hit is not 0
?

regards
 


On 3 Sep 2013, at 5:31 PM, Abdul Sayeed wrote:

Hi,

Below query can be handy to find unused indexes.

select indexrelname from pg_stat_user_indexes where idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0 ;

Hope it helps.



Thanks & Regards,
Abdul Sayeed
EnterpriseDB Corporation - RDBA Team
The Postgres Database Company

Office:  +1-732-931-7033/+91-20-305-89510
Fax: +91-20-30589502
Skype: abdul.sayeed24

EnterpriseDB Blog : http://blogs.enterprisedb.com
Follow us on Twitter : http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution,retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.


On Tue, Sep 3, 2013 at 12:14 PM, Raghavendra <raghavendra.rao@enterprisedb.com> wrote:
On Tue, Sep 3, 2013 at 11:36 AM, ascot.moss@gmail.com <ascot.moss@gmail.com> wrote:
Hi,

Can you please advise how to find out all unused indexes in PG?

regards

Below wiki link should help; under "Unused Index" section:


---
Regards,
Raghavendra
EnterpriseDB Corporation
 

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



Re: How to find out unused indexes?

От
Jeff Janes
Дата:
On Tue, Sep 3, 2013 at 8:48 AM, ascot.moss@gmail.com
<ascot.moss@gmail.com> wrote:
> Thanks.
>
> how about  the case as follows?
>
> idx_scan = 0 and idx_tup_read = 0 and idx_tup_fetch = 0, but
> idx_blks_read is not 0 and idx_blks_hit is not 0
> ?

Maintaining an unused index still requires its blocks to be read.

Cheers,

Jeff