4 Replies Latest reply: Aug 28, 2013 2:48 AM by c4395011-48d9-441a-b16d-dfc34de1bd5f RSS

    RDFS entailment rules

    c4395011-48d9-441a-b16d-dfc34de1bd5f

      Hi,

       

      I've been running oracle infencing using OWLPRIME, RDFS and user-defined rules. Recently, the RDFS2 (domain) rule has been taking much longer than usual (over two and a half hours), whereas RDFS3 (range) still only lasts a few minutes, even though I've inserted about the same amount of range and domain information. During the create_entailments procedure, the rule reads: /* rule: DOM_RDFS2 NON PROC */ , as opposed to /* rule: RAN_RDFS3 */ for the range rule.

       

      I would like to know what "NON PROC" means, and if (as I suspect) it indicates a problem, if there is any way to take care of it.

       

      Thank you in advance,

      Zelda

        • 1. Re: RDFS entailment rules
          alwu-Oracle

          Hi Zelda,

           

          Which DB version are you using?

           

          NON PROC means that we are not using procedural approach to handle this rule.

          In other words, we handle all properties in one shot.

           

          Can you please get the execution plan for the DOM_RDFS2 rule? Are you using

          parallel inference?

           

          Thanks,


          Zhe Wu

          • 2. Re: RDFS entailment rules
            c4395011-48d9-441a-b16d-dfc34de1bd5f

            Hi,

             

            I'm using DB version 11.2.0.3, with parallel inferencing (DOP = 8).

             

            Here is the execution plan:

            INSERT                                                           /*+ append */

                                                            /* rule: DOM_RDFS2 NON PROC */

                  INTO                                               MDSYS.RDF#697 (

                                                                        start_node_id,

                                                                        p_value_id,

                                                                        canon_end_node_id /* NGLI_PJ */

                                                                                         )

               SELECT s_id start_node_id,

                      834132227519661324 p_value_id,

                      c_id canon_end_node_id                                 /* NGLI_OS */

                 FROM (SELECT DISTINCT

                              (m1.start_node_id) s_id, (m2.canon_end_node_id) c_id /* NGLI_IS */

                         FROM (SELECT start_node_id, p_value_id, canon_end_node_id

                                 FROM MDSYS.RDF#697#2 s

                               UNION ALL

                               SELECT start_node_id, p_value_id, canon_end_node_id

                                 FROM MDSYS.RDF#697) m1,

                              (SELECT start_node_id, p_value_id, canon_end_node_id

                                 FROM MDSYS.RDF#697#2 s

                               UNION ALL

                               SELECT start_node_id, p_value_id, canon_end_node_id

                                 FROM MDSYS.RDF#697) m2

                        WHERE m1.p_value_id = m2.start_node_id

                              AND m2.p_value_id = 4725356502541770414/* NGLI_AP */

                                                                     )

                WHERE NOT EXISTS

                             (SELECT                                        /*+ HASH_AJ */

                                    1

                                FROM (SELECT start_node_id, p_value_id, canon_end_node_id

                                        FROM MDSYS.RDF#697#2 s

                                      UNION ALL

                                      SELECT start_node_id, p_value_id, canon_end_node_id

                                        FROM MDSYS.RDF#697) x

                               WHERE     x.start_node_id = s_id

                                     AND x.p_value_id = 834132227519661324

                                     AND x.canon_end_node_id = c_id          /* NGLI_NP */

                                                                   )

             

             

             

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

            | Id  | Operation                              | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |

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

            |   0 | INSERT STATEMENT                       |           |   129M|  8015M|       |   348K  (1)| 01:09:46 |       |       |        |      |            |

            |   1 |  LOAD AS SELECT                        | RDF#697   |       |       |       |            |          |       |       |        |      |            |

            |   2 |   PX COORDINATOR                       |           |       |       |       |            |          |       |       |        |      |            |

            |   3 |    PX SEND QC (RANDOM)                 | :TQ10006  |   129M|  8015M|       |   348K  (1)| 01:09:46 |       |       |  Q1,06 | P->S | QC (RAND)  |

            |*  4 |     HASH JOIN RIGHT ANTI               |           |   129M|  8015M|       |   348K  (1)| 01:09:46 |       |       |  Q1,06 | PCWP |            |

            |   5 |      PX RECEIVE                        |           |   633K|    23M|       |  4616   (2)| 00:00:56 |       |       |  Q1,06 | PCWP |            |

            |   6 |       PX SEND BROADCAST                | :TQ10004  |   633K|    23M|       |  4616   (2)| 00:00:56 |       |       |  Q1,04 | P->P | BROADCAST  |

            |   7 |        BUFFER SORT                     |           |   109M|  4072M|       |            |          |       |       |  Q1,04 | PCWP |            |

            |   8 |         VIEW                           |           |   633K|    23M|       |  4616   (2)| 00:00:56 |       |       |  Q1,04 | PCWP |            |

            |   9 |          UNION-ALL                     |           |       |       |       |            |          |       |       |  Q1,04 | PCWP |            |

            |  10 |           PX BLOCK ITERATOR            |           |   633K|    21M|       |   123   (2)| 00:00:02 |     4 |     4 |  Q1,04 | PCWC |            |

            |* 11 |            TABLE ACCESS FULL           | RDF#697#2 |   633K|    21M|       |   123   (2)| 00:00:02 |     4 |     4 |  Q1,04 | PCWP |            |

            |  12 |           BUFFER SORT                  |           |       |       |       |            |          |       |       |  Q1,04 | PCWC |            |

            |  13 |            PX RECEIVE                  |           |     1 |    35 |       |  4493   (2)| 00:00:54 |       |       |  Q1,04 | PCWP |            |

            |  14 |             PX SEND ROUND-ROBIN        | :TQ10001  |     1 |    35 |       |  4493   (2)| 00:00:54 |       |       |        | S->P | RND-ROBIN  |

            |  15 |              PARTITION LIST SINGLE     |           |     1 |    35 |       |  4493   (2)| 00:00:54 |   KEY |   KEY |        |      |            |

            |  16 |               TABLE ACCESS FULL        | RDF#697   |     1 |    35 |       |  4493   (2)| 00:00:54 |     1 |     1 |        |      |            |

            |  17 |      VIEW                              |           |   134M|  3323M|       |   344K  (1)| 01:08:50 |       |       |  Q1,06 | PCWP |            |

            |  18 |       SORT UNIQUE                      |           |   134M|  7798M|  9267M|   344K  (1)| 01:08:50 |       |       |  Q1,06 | PCWP |            |

            |  19 |        PX RECEIVE                      |           |   134M|  7798M|       | 69103   (2)| 00:13:50 |       |       |  Q1,06 | PCWP |            |

            |  20 |         PX SEND HASH                   | :TQ10005  |   134M|  7798M|       | 69103   (2)| 00:13:50 |       |       |  Q1,05 | P->P | HASH       |

            |* 21 |          HASH JOIN BUFFERED            |           |   134M|  7798M|       | 69103   (2)| 00:13:50 |       |       |  Q1,05 | PCWP |            |

            |  22 |           PX RECEIVE                   |           |  1331 | 49247 |       |     4   (0)| 00:00:01 |       |       |  Q1,05 | PCWP |            |

            |  23 |            PX SEND BROADCAST           | :TQ10003  |  1331 | 49247 |       |     4   (0)| 00:00:01 |       |       |  Q1,03 | P->P | BROADCAST  |

            |  24 |             BUFFER SORT                |           |   109M|  4072M|       |            |          |       |       |  Q1,03 | PCWP |            |

            |  25 |              VIEW                      |           |  1331 | 49247 |       |     4   (0)| 00:00:01 |       |       |  Q1,03 | PCWP |            |

            |  26 |               UNION-ALL                |           |       |       |       |            |          |       |       |  Q1,03 | PCWP |            |

            |  27 |                PX BLOCK ITERATOR       |           |  1257 | 45252 |       |     2   (0)| 00:00:01 |    28 |    28 |  Q1,03 | PCWC |            |

            |* 28 |                 TABLE ACCESS FULL      | RDF#697#2 |  1257 | 45252 |       |     2   (0)| 00:00:01 |    28 |    28 |  Q1,03 | PCWP |            |

            |  29 |                BUFFER SORT             |           |       |       |       |            |          |       |       |  Q1,03 | PCWC |            |

            |  30 |                 PX RECEIVE             |           |    74 |  2664 |       |     2   (0)| 00:00:01 |       |       |  Q1,03 | PCWP |            |

            |  31 |                  PX SEND ROUND-ROBIN   | :TQ10000  |    74 |  2664 |       |     2   (0)| 00:00:01 |       |       |        | S->P | RND-ROBIN  |

            |  32 |                   PARTITION LIST SINGLE|           |    74 |  2664 |       |     2   (0)| 00:00:01 |   KEY |   KEY |        |      |            |

            |  33 |                    TABLE ACCESS FULL   | RDF#697   |    74 |  2664 |       |     2   (0)| 00:00:01 |    20 |    20 |        |      |            |

            |  34 |           VIEW                         |           |   126M|  2897M|       | 69037   (2)| 00:13:49 |       |       |  Q1,05 | PCWP |            |

            |  35 |            UNION-ALL                   |           |       |       |       |            |          |       |       |  Q1,05 | PCWP |            |

            |  36 |             PX BLOCK ITERATOR          |           |    17M|   391M|       |  1361   (2)| 00:00:17 |     1 |    32 |  Q1,05 | PCWC |            |

            |  37 |              TABLE ACCESS FULL         | RDF#697#2 |    17M|   391M|       |  1361   (2)| 00:00:17 |     1 |    32 |  Q1,05 | PCWP |            |

            |  38 |             BUFFER SORT                |           |       |       |       |            |          |       |       |  Q1,05 | PCWC |            |

            |  39 |              PX RECEIVE                |           |   109M|  2506M|       | 67677   (2)| 00:13:33 |       |       |  Q1,05 | PCWP |            |

            |  40 |               PX SEND ROUND-ROBIN      | :TQ10002  |   109M|  2506M|       | 67677   (2)| 00:13:33 |       |       |        | S->P | RND-ROBIN  |

            |  41 |                PARTITION LIST ALL      |           |   109M|  2506M|       | 67677   (2)| 00:13:33 |     1 |    34 |        |      |            |

            |  42 |                 TABLE ACCESS FULL      | RDF#697   |   109M|  2506M|       | 67677   (2)| 00:13:33 |     1 |    34 |        |      |            |

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

             

            Predicate Information (identified by operation id):

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

             

               4 - access("X"."START_NODE_ID"="S_ID" AND "X"."CANON_END_NODE_ID"="C_ID")

              11 - filter("P_VALUE_ID"=834132227519661324)

              21 - access("M1"."P_VALUE_ID"="M2"."START_NODE_ID")

              28 - filter("P_VALUE_ID"=4725356502541770414)

             

            Thanks,

            Zelda

            • 3. Re: RDFS entailment rules
              alwu-Oracle

              Hi Zelda,

               

              Thanks. How many rows were generated by the DOMAIN rule as opposed to the RANGE rule?

               

              BTW, do you have Oracle Support account? If so,

              the easiest thing is to send your test case to Oracle Support. We can try to reproduce your problem locally.

               

              Zhe Wu

              • 4. Re: RDFS entailment rules
                c4395011-48d9-441a-b16d-dfc34de1bd5f

                Hi Zhe Wu,

                 

                I do have an Oracle Support account, but it will take me a while to generate a usecase. I'll post my next questions over there.

                 

                Thanks for your help!

                Zelda