SPARQL query after parsing, optimization, and converting back into SPARQL SELECT ?catAtt ?caDataType ?showInview ?valFormatKey ?multiple ?position ?link ?setting ?flag ?caUnit WHERE { GRAPH { QUAD MAP { ?catAtt 1 } QUAD MAP { ?catAtt ?caDataType } QUAD MAP { ?catAtt ?showInview } QUAD MAP { ?catAtt ?valFormatKey } QUAD MAP { ?catAtt ?multiple } QUAD MAP { ?catAtt ?position } QUAD MAP { ?catAtt ?link } QUAD MAP { ?catAtt ?setting } QUAD MAP { ?catAtt ?flag } QUAD MAP { ?catAtt ?caUnit } } } LIMIT 20 SPARQL query translated to SQL For security reasons, code responsible for graph-level security is not generated and some account-specific data are intentionally made wrong. SELECT TOP 20 __id2in ( "s_23_10_t9"."S") AS "catAtt", __ro2sq ( "s_23_10_t1"."O") AS "caDataType", __ro2sq ( "s_23_10_t2"."O") AS "showInview", __ro2sq ( "s_23_10_t3"."O") AS "valFormatKey", __ro2sq ( "s_23_10_t4"."O") AS "multiple", __ro2sq ( "s_23_10_t5"."O") AS "position", __ro2sq ( "s_23_10_t6"."O") AS "link", __ro2sq ( "s_23_10_t7"."O") AS "setting", __ro2sq ( "s_23_10_t8"."O") AS "flag", __ro2sq ( "s_23_10_t9"."O") AS "caUnit" FROM DB.DBA.RDF_QUAD AS "s_23_10_t0" INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t1" ON ( "s_23_10_t1"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t2" ON ( "s_23_10_t2"."S" = "s_23_10_t1"."S" AND "s_23_10_t2"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t3" ON ( "s_23_10_t3"."S" = "s_23_10_t2"."S" AND "s_23_10_t3"."S" = "s_23_10_t1"."S" AND "s_23_10_t3"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t4" ON ( "s_23_10_t4"."S" = "s_23_10_t3"."S" AND "s_23_10_t4"."S" = "s_23_10_t2"."S" AND "s_23_10_t4"."S" = "s_23_10_t1"."S" AND "s_23_10_t4"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t5" ON ( "s_23_10_t5"."S" = "s_23_10_t4"."S" AND "s_23_10_t5"."S" = "s_23_10_t3"."S" AND "s_23_10_t5"."S" = "s_23_10_t2"."S" AND "s_23_10_t5"."S" = "s_23_10_t1"."S" AND "s_23_10_t5"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t6" ON ( "s_23_10_t6"."S" = "s_23_10_t5"."S" AND "s_23_10_t6"."S" = "s_23_10_t4"."S" AND "s_23_10_t6"."S" = "s_23_10_t3"."S" AND "s_23_10_t6"."S" = "s_23_10_t2"."S" AND "s_23_10_t6"."S" = "s_23_10_t1"."S" AND "s_23_10_t6"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t7" ON ( "s_23_10_t7"."S" = "s_23_10_t6"."S" AND "s_23_10_t7"."S" = "s_23_10_t5"."S" AND "s_23_10_t7"."S" = "s_23_10_t4"."S" AND "s_23_10_t7"."S" = "s_23_10_t3"."S" AND "s_23_10_t7"."S" = "s_23_10_t2"."S" AND "s_23_10_t7"."S" = "s_23_10_t1"."S" AND "s_23_10_t7"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t8" ON ( "s_23_10_t8"."S" = "s_23_10_t7"."S" AND "s_23_10_t8"."S" = "s_23_10_t6"."S" AND "s_23_10_t8"."S" = "s_23_10_t5"."S" AND "s_23_10_t8"."S" = "s_23_10_t4"."S" AND "s_23_10_t8"."S" = "s_23_10_t3"."S" AND "s_23_10_t8"."S" = "s_23_10_t2"."S" AND "s_23_10_t8"."S" = "s_23_10_t1"."S" AND "s_23_10_t8"."S" = "s_23_10_t0"."S") INNER JOIN DB.DBA.RDF_QUAD AS "s_23_10_t9" ON ( "s_23_10_t9"."S" = "s_23_10_t8"."S" AND "s_23_10_t9"."S" = "s_23_10_t7"."S" AND "s_23_10_t9"."S" = "s_23_10_t6"."S" AND "s_23_10_t9"."S" = "s_23_10_t5"."S" AND "s_23_10_t9"."S" = "s_23_10_t4"."S" AND "s_23_10_t9"."S" = "s_23_10_t3"."S" AND "s_23_10_t9"."S" = "s_23_10_t2"."S" AND "s_23_10_t9"."S" = "s_23_10_t1"."S" AND "s_23_10_t9"."S" = "s_23_10_t0"."S") WHERE "s_23_10_t0"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t0"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/catId' , 1)) AND "s_23_10_t0"."O" = 1 AND "s_23_10_t1"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t1"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/caDataType' , 1)) AND "s_23_10_t2"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t2"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/showInView' , 1)) AND "s_23_10_t3"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t3"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/valFormat' , 1)) AND "s_23_10_t4"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t4"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/multiple' , 1)) AND "s_23_10_t5"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t5"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/position' , 1)) AND "s_23_10_t6"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t6"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/link' , 1)) AND "s_23_10_t7"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t7"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/setting' , 1)) AND "s_23_10_t8"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t8"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/flag' , 1)) AND "s_23_10_t9"."G" = __i2idn ( __bft( 'http://localhost:8890/graph' , 1)) AND "s_23_10_t9"."P" = __i2idn ( __bft( 'https://graph.com/rdf/qq/unit' , 1)) OPTION (QUIETCAST) SQL execution plan { RDF_QUAD_POGS 24 rows(s_23_10_t0.S$28) P = IRI_ID"...catId" , O = 1 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t1.S$32, s_23_10_t1.O$31) inlined P = IRI_ID"...caDataType" , S = k_s_23_10_t0.S$113 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t2.S$36, s_23_10_t2.O$35) inlined P = IRI_ID"...showInView" , S = k_s_23_10_t1.S$124 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t3.S$40, s_23_10_t3.O$39) inlined P = IRI_ID"...valFormat" , S = k_s_23_10_t2.S$135 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t4.S$44, s_23_10_t4.O$43) inlined P = IRI_ID"...multiple" , S = k_s_23_10_t3.S$146 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t5.S$48, s_23_10_t5.O$47) inlined P = IRI_ID"...position" , S = k_s_23_10_t4.S$157 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t6.S$52, s_23_10_t6.O$51) inlined P = IRI_ID"...link" , S = k_s_23_10_t5.S$168 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t7.S$56, s_23_10_t7.O$55) inlined P = IRI_ID"...setting" , S = k_s_23_10_t6.S$179 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t8.S$60, s_23_10_t8.O$59) inlined P = IRI_ID"...flag" , S = k_s_23_10_t7.S$190 G = IRI_ID"...graph" RDF_QUAD 1 rows(s_23_10_t9.S$64, s_23_10_t9.O$63) inlined P = IRI_ID"...unit" , S = k_s_23_10_t8.S$201 G = IRI_ID"...graph" skip node 20 set_ctr$92 After code: 0: flag$66 := Call __ro2sq (s_23_10_t8.O$59) 5: setting$68 := Call __ro2sq (s_23_10_t7.O$55) 10: link$70 := Call __ro2sq (s_23_10_t6.O$51) 15: position$72 := Call __ro2sq (s_23_10_t5.O$47) 20: multiple$74 := Call __ro2sq (s_23_10_t4.O$43) 25: valFormatKey$76 := Call __ro2sq (s_23_10_t3.O$39) 30: showInview$78 := Call __ro2sq (s_23_10_t2.O$35) 35: caDataType$80 := Call __ro2sq (s_23_10_t1.O$31) 40: catAtt$82 := Call __id2in (s_23_10_t9.S$64) 45: caUnit$84 := Call __ro2sq (s_23_10_t9.O$63) 50: BReturn 0 Select (catAtt$82, caDataType$80, showInview$78, valFormatKey$76, multiple$74, position$72, link$70, setting$68, flag$66, caUnit$84) } Internal optimizer data These data are primarily for OpenLink support, to get additional details about the query processing. QUERY: (line 27) REQUEST TOP NODE (SELECT result-mode): RETVALS: ARRAY OF NODES with 10 children: { (line 27) VARIABLE: notNULL reference exported NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 10 (line 27) VARIABLE: notNULL exported NAME: UNAME `caDataType' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 11 (line 27) VARIABLE: notNULL exported NAME: UNAME `showInview' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 12 (line 27) VARIABLE: notNULL exported NAME: UNAME `valFormatKey' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 13 (line 27) VARIABLE: notNULL exported NAME: UNAME `multiple' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 14 (line 27) VARIABLE: notNULL exported NAME: UNAME `position' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 15 (line 27) VARIABLE: notNULL exported NAME: UNAME `link' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 16 (line 27) VARIABLE: notNULL exported NAME: UNAME `setting' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 17 (line 27) VARIABLE: notNULL exported NAME: UNAME `flag' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 18 (line 27) VARIABLE: notNULL exported NAME: UNAME `caUnit' SELECT ID: STRING `s_27_11' TABLE ID: LONG 0 EQUIV: LONG 19 } RETVALS SELECT ID: STRING `s_27_11' SOURCES: EMPTY ARRAY PATTERN: (line 27) GRAPH PATTERN:WHERE gp MEMBERS: ARRAY OF NODES with 10 children: { (line 8) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t0' EQUIV: LONG 10 PREDICATE: (line 8) QNAME: IRI: UNAME `https://graph.com/rdf/qq/catId' OBJECT: (line 8) LITERAL: VALUE: LONG 1 DATATYPE: UNAME `http://www.w3.org/2001/XMLSchema#integer' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t0' (line 9) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t1' EQUIV: LONG 10 PREDICATE: (line 9) QNAME: IRI: UNAME `https://graph.com/rdf/qq/caDataType' OBJECT: (line 9) VARIABLE: notNULL+ exported (object) NAME: UNAME `caDataType' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t1' EQUIV: LONG 11 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t1' (line 10) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t2' EQUIV: LONG 10 PREDICATE: (line 10) QNAME: IRI: UNAME `https://graph.com/rdf/qq/showInView' OBJECT: (line 10) VARIABLE: notNULL+ exported (object) NAME: UNAME `showInview' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t2' EQUIV: LONG 12 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t2' (line 11) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t3' EQUIV: LONG 10 PREDICATE: (line 11) QNAME: IRI: UNAME `https://graph.com/rdf/qq/valFormat' OBJECT: (line 11) VARIABLE: notNULL+ exported (object) NAME: UNAME `valFormatKey' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t3' EQUIV: LONG 13 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t3' (line 12) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t4' EQUIV: LONG 10 PREDICATE: (line 12) QNAME: IRI: UNAME `https://graph.com/rdf/qq/multiple' OBJECT: (line 12) VARIABLE: notNULL+ exported (object) NAME: UNAME `multiple' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t4' EQUIV: LONG 14 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t4' (line 13) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t5' EQUIV: LONG 10 PREDICATE: (line 13) QNAME: IRI: UNAME `https://graph.com/rdf/qq/position' OBJECT: (line 13) VARIABLE: notNULL+ exported (object) NAME: UNAME `position' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t5' EQUIV: LONG 15 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t5' (line 14) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t6' EQUIV: LONG 10 PREDICATE: (line 14) QNAME: IRI: UNAME `https://graph.com/rdf/qq/link' OBJECT: (line 14) VARIABLE: notNULL+ exported (object) NAME: UNAME `link' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t6' EQUIV: LONG 16 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t6' (line 15) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t7' EQUIV: LONG 10 PREDICATE: (line 15) QNAME: IRI: UNAME `https://graph.com/rdf/qq/setting' OBJECT: (line 15) VARIABLE: notNULL+ exported (object) NAME: UNAME `setting' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t7' EQUIV: LONG 17 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t7' (line 16) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t8' EQUIV: LONG 10 PREDICATE: (line 16) QNAME: IRI: UNAME `https://graph.com/rdf/qq/flag' OBJECT: (line 16) VARIABLE: notNULL+ exported (object) NAME: UNAME `flag' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t8' EQUIV: LONG 18 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t8' (line 17) TRIPLE: GRAPH: (line 6) QNAME: IRI: UNAME `http://localhost:8890/graph' SUBJECT: (line 8) VARIABLE: notNULL+ reference+ exported (subject) NAME: UNAME `catAtt' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t9' EQUIV: LONG 10 PREDICATE: (line 17) QNAME: IRI: UNAME `https://graph.com/rdf/qq/unit' OBJECT: (line 17) VARIABLE: notNULL+ exported (object) NAME: UNAME `caUnit' SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t9' EQUIV: LONG 19 SELECT ID: STRING `s_27_11' TABLE ID: STRING `s_23_10_t9' } FILTERS: EMPTY ARRAY SELECT ID: STRING `s_27_11' EQUIVS: 10 11 12 13 14 15 16 17 18 19 LIMIT: LONG 20 EQUIVS: #0: merged and destroyed #1: merged and destroyed #2: merged and destroyed #3: merged and destroyed #4: merged and destroyed #5: merged and destroyed #6: merged and destroyed #7: merged and destroyed #8: merged and destroyed #9: merged and destroyed #10: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 10 gspo, 1 const, 0 opt, 0 subq: catAtt in s_27_11 s_23_10_t9 s_23_10_t8 s_23_10_t7 s_23_10_t6 s_23_10_t5 s_23_10_t4 s_23_10_t3 s_23_10_t2 s_23_10_t1 s_23_10_t0; notNULL reference exported) #11: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: caDataType in s_27_11 s_23_10_t1; notNULL exported) #12: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: showInview in s_27_11 s_23_10_t2; notNULL exported) #13: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: valFormatKey in s_27_11 s_23_10_t3; notNULL exported) #14: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: multiple in s_27_11 s_23_10_t4; notNULL exported) #15: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: position in s_27_11 s_23_10_t5; notNULL exported) #16: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: link in s_27_11 s_23_10_t6; notNULL exported) #17: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: setting in s_27_11 s_23_10_t7; notNULL exported) #18: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: flag in s_27_11 s_23_10_t8; notNULL exported) #19: ( 0 subv (0 bindings, 0 nest.opt.), 0 recv, 1 gspo, 1 const, 0 opt, 0 subq: caUnit in s_27_11 s_23_10_t9; notNULL exported)