Hi Quentin, Development indicate that the correct way is using an "INI" clause ie "?g in (<g1>, >G2>, …)" , as this does not make temporary tables. The problem you are getting is that you get one indexed access per distinct g because g is a key part of the rdf quad table, which is due to a bad query plan. There is an update already done and pending inclusion into open source that does the "IN" clause as an invisible hash join, i.e. hash join merged into index lookup and is one of the fastest on the block, including all the specialized column store data warehouses. With the update the not in case is also very efficient. If obtain a query plan with the "explain" or "profile" functions and you see an "in_iter" on the g in front of an access to rdf_quad in the plan explain then you have the wrong thing. If you have the rdf quad first and then hash partition+bloom than it is the good one.
Best Regards Hugh Williams Professional Services OpenLink Software, Inc. // http://www.openlinksw.com/ Weblog -- http://www.openlinksw.com/blogs/ LinkedIn -- http://www.linkedin.com/company/openlink-software/ Twitter -- http://twitter.com/OpenLink Google+ -- http://plus.google.com/100570109519069333827/ Facebook -- http://www.facebook.com/OpenLinkSoftware Universal Data Access, Integration, and Management Technology Providers On 13 Dec 2013, at 06:43, Quentin <quent...@clearbluewater.com.au> wrote: > Hi, > > If I'm executing a query in sparql, in Virtuoso 7, that uses heavy graph > filtering along the lines of: > > SELECT * > { GRAPH ?G { > filter ( ?G in (<test1>, <test2>....<test76>) ) > .... > }} > > Will this cause large temporary tables to be created or will it just do > lookups against the Graph column of the Quad store? > > If the above is a bad idea, is there a more efficient way to join or filter > graphs? > > A secondary question is would this query be rendered much more expensive if > it included a subclause along the lines of: > SELECT * > { GRAPH ?G { > filter ( ?G in (<test1>, <test2>....<test76>) ) > { GRAPH ?Ginner { > filter (?Ginner in ( <test11>,<test13>,<test17> ) ) > }}}} > > Does this type of construction force temporary tables? > -- > Quentin | Clear Blue Water Pty Ltd > quent...@clearbluewater.com.au > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users