Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

what is the current Berkeley DB Java Edition release? is there a public source code repository

AndyGlickDec 7 2020

The standard Oracle Berkeley DB Java Edition pages give the current release as 7.5.11. And offers what looks to be a complete distribution. This is some years old.
Maven Central offers a release of com.sleepycat:je:18.3.12 which offers a more recent jar file, a source jarfile and a javadoc jar file, but it does not offer the test code or the examples.
Given that this product is released under an open source license it would be helpful if a source code repository were available. In addition, as I understand it the Affero GPL requires that OSS licensees are obligated to contribute their enhancements and bug fixes back to Oracle, but there seems to be no way of doing that, or rather there does not appear to be anyway that OSS participants can share changes among each other.
If the current release is in fact 18.3.12 then would you please create such a full release? If you aren't going to treat it as a release, then what are your intentions going forward for this product and how can OSS licensees see each other's work?

Comments

tlokweng
Answer

クエリトランスフォーメーションのビューマージで2階層のクエリが1階層に置換され、結果として各行でプロシジャが2回づつ呼ばれているということですね。なので単純にプロシジャを呼んでいるインラインビューがマージされないようにすれば解決します。素直にNO_MERGEヒントでOKでしょう。テーブルサイズが大きくなければWITHにしてファクタリングするのもアリですね。

> create table test_table(n) as select 1 from dual union select 2 from dual;

> create function test_func return varchar2 as begin RETURN DBMS_RANDOM.STRING('x', 10); end;

> select n, r r1, r r2 from (select n, test_func r from test_table);

        N R1          R2

--------- ------------ ------------

        1 AJ1LNZ30HD  LAMQV4CQUY

        2 F911DGQDYZ  ID8FDREGKF

> select n, r r1, r r2 from (select /*+ no_merge */ n, test_func r from test_table);

--------- ------------ ------------

        1 K5MPMUR3DQ  K5MPMUR3DQ

        2 DD2Y5NUWPM  DD2Y5NUWPM

> with t as (select /*+ materialize */ n, test_func r from test_table) select n, r r1, r r2 from t;

--------- ------------ ------------

        1 0F2RE7Y8C3  0F2RE7Y8C3

        2 O6C4WCBAFP  O6C4WCBAFP

Marked as Answer by 988825 · Sep 27 2020
988825

tlokweng様、お礼が遅くなってしまい、申し訳ありません。サンプルまでお示しくださいまして、誠にありがとうございます。

クエリトランスフォーメーションがこのようなSQLに対し作用しているとは全く一度も想像すらつきませんでした。

頂戴したサンプルで動作も確認出来ましたので、本来の組み込み先に入れてみようと思います。

ありがとうございました。

1 - 2

Post Details

Added on Dec 7 2020
11 comments
1,212 views