Home » Developer & Programmer » Forms » Adding hint (10g)
Adding hint (10g) [message #684263] Thu, 29 April 2021 05:03 Go to next message
jury68000
Messages: 20
Registered: October 2019
Junior Member
I would like to add hint /*+ parallel */ to one data_block based on a table.
When I put /*+ parallel */ into property "Optimizer hint" in "Property palette", it seems that it has no effect, as there is no result running
select * from v$sql where lower(sql_text) like '%parallel%' and lower(sql_text) like '%my_table_name%'
and the form execution takes exactly the same amount of time then when there is nothing in "Optimizer hint" property.

But when in sql plus I manually run the query on the table from that Forms data_block with /*+ parallel */ hint, than it executes 3 times faster compared to running without the hint. And running
select * from v$sql where lower(sql_text) like '%parallel%' and lower(sql_text) like '%my_table_name%'
of course returns that query.

I have found on this forum some mysterius saying
http://www.orafaq.com/forum/mv/msg/207002/681717/#msg_681717
that it could be an oracle bug, but I can not find anything more on that matter and I somehow doubt that this is a bug.

So what am I missing here?


Forms 10.1.2.0.2
Oracle db 11.2.0.3.0

[Updated on: Thu, 29 April 2021 06:30]

Report message to a moderator

Re: Adding hint (10g) [message #684282 is a reply to message #684263] Fri, 30 April 2021 06:53 Go to previous messageGo to next message
Littlefoot
Messages: 21678
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have your Forms version.

However, navigate to the "Optimizer hint" property and press F1 to open "Help". According to it, you should put just parallel in there not the whole /*+ parallel */.

That's what, at least, Help example which uses SET_BLOCK_PROPERTY suggests:

Set_Block_Property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS'); 
See? It's not "/*+ FIRST_ROWS*/" but just "FIRST_ROWS".
Re: Adding hint (10g) [message #684283 is a reply to message #684282] Fri, 30 April 2021 07:07 Go to previous messageGo to next message
jury68000
Messages: 20
Registered: October 2019
Junior Member
Yes, you are right. I have seen the "Help" on this property and 'parallel' is what I have put in that "Optimizer hint" property. It is just a typo in the opening post, sorry.
But 'parallel' (or /*+ parallel */ which I of course checked also Smile ) does not work.
Currently I used
Set_Block_Property('my_block',OPTIMIZER_HINT,'parallel'); 
in pre-query trigger and it works as expected. So I gave up setting this hint at design time, maybe there is a bug as the guy from that link says ...
Thanks.

[Updated on: Fri, 30 April 2021 07:08]

Report message to a moderator

Re: Adding hint (10g) [message #684288 is a reply to message #684283] Fri, 30 April 2021 16:02 Go to previous message
Littlefoot
Messages: 21678
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Great, I'm glad that at least something works. Thank you for letting us know.
Previous Topic: How to run Direct printing in forms 10g
Next Topic: Save File PDF to local directory in windows
Goto Forum:
  


Current Time: Sun Jun 20 20:49:40 CDT 2021