That worked pretty well, thanks! -------------------- Clark Richey, CTO FactGem 240-252-7507 [email protected]<mailto:[email protected]>
[cid:DB3DED71-9092-4039-BC47-7254B572F9D5] Need immediate assistance? Please try: Cate Downing, Assistant Beth Price, Assistant [email protected]<mailto:[email protected]> [email protected]<mailto:[email protected]> 614.325.2404 614.365.0740 This message and any included attachments are property of FactGem and its affiliates, and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail. Thank you. On Mar 24, 2014, at 2:23 PM, David Ennis <[email protected]<mailto:[email protected]>> wrote: HI. I had a similiar query recently. That is the only way to get the exact number of triples as of ML7.2... Part of the overhead is that the cts:triples removes duplicates. My solution was to add an index on sem:triples and then use regular cts related features (including xdmp:estimate), but that required an index and did not remove duplicates - BUT, it was fast. John Snelson form MarkLogic shared this as a solution: If you turn on the diagnostic flag called "SPARQL Value Frequencies" (Admin UI: Configure->Groups->Default->Diagnostics), then when you run a new SPARQL query it will log something like this: 2014-02-25 10:23:36.246 Info: [Event:id=SPARQL Value Frequencies] sessionKey=9770609635549801812 values= 2014-02-25 10:23:36.246 Info: () = count:1469913, sUniq:69712, pUniq:1622, oUniq:196241 2014-02-25 10:23:36.246 Info: <blah> = freq:0, s: (count:0, pUniq: 0, oUniq: 0), p: (count:0, sUniq: 0, oUniq: 0), o: (count:0, sUniq: 0, pUniq: 0) 2014-02-25 10:23:36.246 Info: <foo> = freq:0, s: (count:0, pUniq: 0, oUniq: 0), p: (count:0, sUniq: 0, oUniq: 0), o: (count:0, sUniq: 0, pUniq: 0) If you take the figure after "() = count:" (in this case 1469913) and divide by 3 that will me the numbers of triples in the system, including duplicates and triples in deleted but not yet merged out documents. This gives you the rough number without the need for a new index, but is not available via programming (unless, of course you parsed the log file) Kind Regards, David Ennis -- David Ennis Content Engineer [HintTech Mastering the value of content]<http://www.hinttech.com/> Mastering the value of content creative | technology | content Delftechpark 37i 2628 XJ Delft The Netherlands T: +31 88 268 25 00 M: +31 6 000 000 00 [Website]<http://www.hinttech.com/> [Twitter] <https://twitter.com/HintTech> [Facebook] <http://www.facebook.com/HintTech> [LinkedIn] <http://www.linkedin.com/company/HintTech> [HintTech Mastering the value of content]<http://www.dayon.nl/> On 24 March 2014 19:12, Joe Bryan <[email protected]<mailto:[email protected]>> wrote: Hi Clark, This can be very slow, but I'm not aware of any alternatives: fn:count(cts:triples()) Thanks. -jb Joseph Bryan Sr. Field Engineer MarkLogic Corporation From: Clark Richey <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Monday, March 24, 2014 at 2:10 PM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] number of triples Is there an easy way to determine the number of total triples in the DB? I have triples insides of other documents. -------------------- Clark Richey, CTO FactGem 240-252-7507<tel:240-252-7507> [email protected]<mailto:[email protected]> <8F9B7491-1F5C-43A4-8779-D11F38F15E68.png> Need immediate assistance? Please try: Cate Downing, Assistant Beth Price, Assistant [email protected]<mailto:[email protected]> [email protected]<mailto:[email protected]> 614.325.2404<tel:614.325.2404> 614.365.0740<tel:614.365.0740> This message and any included attachments are property of FactGem and its affiliates, and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail. Thank you. _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
<<inline: 8F9B7491-1F5C-43A4-8779-D11F38F15E68.png>>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
