From: Date: November 2 2003 8:39am Subject: use case: resolve references to unique tuples List-Archive: http://lists.mysql.com/benchmarks/30 Message-Id: <20031102073905.GA14086@w3.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This message includes data, a query, and a suggestion to handle resolution of uniquely constrained tuples as a special (early) case. Attachments are referened by [attachement name]. I had this (albeit preverse from many perspectives) query [slowQuery] that was running kinda slow on some dB [db] 2 rows in set (0.96 sec) 2 rows in set (0.95 sec) so I looked at it and figured I'd do an extra query up front to gather some unique values and eliminate a bunch of joins. [fastQuery] 2 rows in set (0.00 sec) 2 rows in set (0.00 sec) That seemed to show some improvement so I figured I'd tell the database what I knew so it could do that step for me. I expected that a unique on __Nodes__.node would allow the database to extract the key for all the joins that constrained to a single tuple by providing a value for a UNIQUE. mysql> ALTER TABLE __Nodes__ ADD UNIQUE u_node(node); Query OK, 64 rows affected (0.08 sec) Records: 64 Duplicates: 0 Warnings: 0 I tried the query again and saw about have the improvement I expected. 2 rows in set (0.35 sec) 2 rows in set (0.32 sec) I imagine this improvement was not because the DB did the same optimization that I did, but because of some more second nature artifact. The scenario is isolating tuples with a unique and making refereneces to the values in that tuple is fairly common. It may be worth putting a little time into this. I thought this use case might make a handy study and benchmark. -- -eric office: +81.466.49.1170 W3C, Keio Research Institute at SFC, Shonan Fujisawa Campus, Keio University, 5322 Endo, Fujisawa, Kanagawa 252-8520 JAPAN +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA cell: +1.857.222.5741 (does not work in Asia) (eric@stripped) Feel free to forward this message to any list for any purpose other than email address distribution. --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=slowQuery mysql> SELECT __Holds___0.id AS __Holds___0_annotation_id, __Holds___1.id AS __Holds___1_annotation_id, __Holds___2.id AS __Holds___2_annotation_id, __Holds___3.id AS __Holds___3_annotation_id, __Holds___4.id AS __Holds___4_body_id FROM __Holds__ AS __Holds___0 INNER JOIN __Nodes__ AS __Nodes___0 ON __Holds___0.p=__Nodes___0.node INNER JOIN __Nodes__ AS __Nodes___2 ON __Holds___0.o=__Nodes___2.node INNER JOIN __Holds__ AS __Holds___1 ON __Holds___1.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___3 ON __Holds___1.p=__Nodes___3.node INNER JOIN __Holds__ AS __Holds___2 ON __Holds___2.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___5 ON __Holds___2.p=__Nodes___5.node INNER JOIN __Holds__ AS __Holds___3 ON __Holds___3.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___7 ON __Holds___3.p=__Nodes___7.node INNER JOIN __Holds__ AS __Holds___4 ON __Holds___4.s=__Holds___3.o INNER JOIN __Nodes__ AS __Nodes___9 ON __Holds___4.p=__Nodes___9.node WHERE __Nodes___0.hash="c74e2b735dd8dc85ad0ee3510c33925f" AND __Nodes___2.hash="acef97e962dd06905694368feda0317f" AND __Nodes___3.hash="5a57811b2e27c10052c3916f8c1d7415" AND __Nodes___5.hash="ddb55f1d54598bb5120e03548d3b1dfa" AND __Nodes___7.hash="93911c4322d01104748a861871acb21c" AND __Nodes___9.hash="c8b099193cc043d0f51b47d65c24300b"; +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | __Holds___0_annotation_id | __Holds___1_annotation_id | __Holds___2_annotation_id | __Holds___3_annotation_id | __Holds___4_body_id | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | 1657 | 1669 | 1659 | 1665 | 1668 | | 1640 | 1651 | 1642 | 1646 | 1649 | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ 2 rows in set (0.96 sec) mysql> SELECT __Holds___0.id AS __Holds___0_annotation_id, __Holds___1.id AS __Holds___1_annotation_id, __Holds___2.id AS __Holds___2_annotation_id, __Holds___3.id AS __Holds___3_annotation_id, __Holds___4.id AS __Holds___4_body_id FROM __Holds__ AS __Holds___0 INNER JOIN __Nodes__ AS __Nodes___0 ON __Holds___0.p=__Nodes___0.node INNER JOIN __Nodes__ AS __Nodes___2 ON __Holds___0.o=__Nodes___2.node INNER JOIN __Holds__ AS __Holds___1 ON __Holds___1.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___3 ON __Holds___1.p=__Nodes___3.node INNER JOIN __Holds__ AS __Holds___2 ON __Holds___2.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___5 ON __Holds___2.p=__Nodes___5.node INNER JOIN __Holds__ AS __Holds___3 ON __Holds___3.s=__Holds___0.s INNER JOIN __Nodes__ AS __Nodes___7 ON __Holds___3.p=__Nodes___7.node INNER JOIN __Holds__ AS __Holds___4 ON __Holds___4.s=__Holds___3.o INNER JOIN __Nodes__ AS __Nodes___9 ON __Holds___4.p=__Nodes___9.node WHERE __Nodes___0.hash="c74e2b735dd8dc85ad0ee3510c33925f" AND __Nodes___2.hash="acef97e962dd06905694368feda0317f" AND __Nodes___3.hash="5a57811b2e27c10052c3916f8c1d7415" AND __Nodes___5.hash="ddb55f1d54598bb5120e03548d3b1dfa" AND __Nodes___7.hash="93911c4322d01104748a861871acb21c" AND __Nodes___9.hash="c8b099193cc043d0f51b47d65c24300b"; +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | __Holds___0_annotation_id | __Holds___1_annotation_id | __Holds___2_annotation_id | __Holds___3_annotation_id | __Holds___4_body_id | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | 1657 | 1669 | 1659 | 1665 | 1668 | | 1640 | 1651 | 1642 | 1646 | 1649 | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ 2 rows in set (0.95 sec) --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=db -- MySQL dump 9.08 -- -- Host: localhost Database: OrderTracking --------------------------------------------------------- -- Server version 4.0.13-log -- -- Table structure for table '__Holds__' -- CREATE TABLE __Holds__ ( id int(10) unsigned NOT NULL auto_increment, p int(4) unsigned NOT NULL default '0', pc int(1) unsigned NOT NULL default '0', s int(4) unsigned NOT NULL default '0', sc int(1) unsigned NOT NULL default '0', o int(4) unsigned NOT NULL default '0', oc int(1) unsigned NOT NULL default '0', r int(4) unsigned default NULL, rc int(1) unsigned default NULL, a int(10) unsigned NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY u_ (p,pc,s,sc,o,oc,r,rc,a) ) TYPE=MyISAM; -- -- Dumping data for table '__Holds__' -- INSERT INTO __Holds__ VALUES (316,4213745315,0,920301122,0,698879031,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (315,2872298667,0,920301122,0,1931923247,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (314,2872298667,0,920301122,0,3153352053,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (313,2872298667,0,920301122,0,665233292,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (312,1117675365,0,920301122,0,277911610,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (311,2745839183,0,920301122,0,1102071125,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (310,3347042791,0,920301122,0,3051706536,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (309,1458390077,0,2934389102,0,920301122,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (308,521921737,0,1413137867,0,945509795,0,NULL,NULL,2); INSERT INTO __Holds__ VALUES (1673,2030972306,0,2966408478,0,822478669,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1672,3777739634,0,2966408478,0,3629480681,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1671,503731721,0,2966408478,0,3407869935,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1670,1008186191,0,3436856321,0,2966408478,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1669,2350740501,0,3436856321,0,3506052897,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1668,1545875467,0,3395208632,0,1866287438,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1667,2611664264,0,3395208632,0,2775708285,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1666,2721821719,0,3395208632,0,2794180798,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1665,1907143196,0,3436856321,0,3395208632,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1664,1713357468,0,3436856321,0,3433919786,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1663,204706399,0,3436856321,0,87395216,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1662,1008186191,0,3436856321,0,1228059441,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1661,70778754,0,3436856321,0,2425886512,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1660,3752686818,0,3436856321,0,3858353486,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1659,2369461754,0,3436856321,0,1398790875,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1658,312191498,0,3436856321,0,4146229868,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1657,204706399,0,3436856321,0,3986698623,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1656,2030972306,0,2352661404,0,822478669,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1655,3777739634,0,2352661404,0,3629480681,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1654,503731721,0,2352661404,0,3407869935,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1653,1008186191,0,1475410689,0,2352661404,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1652,1713357468,0,1475410689,0,247537648,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1651,2350740501,0,1475410689,0,3506052897,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1650,204706399,0,1475410689,0,87395216,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1649,1545875467,0,3325145090,0,2695016568,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1648,2611664264,0,3325145090,0,4054382344,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1647,2721821719,0,3325145090,0,1540900050,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1646,1907143196,0,1475410689,0,3325145090,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1645,1008186191,0,1475410689,0,1228059441,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1644,70778754,0,1475410689,0,506646746,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1643,3752686818,0,1475410689,0,2779842460,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1642,2369461754,0,1475410689,0,2793789278,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1641,312191498,0,1475410689,0,4146229868,0,NULL,NULL,3); INSERT INTO __Holds__ VALUES (1640,204706399,0,1475410689,0,3986698623,0,NULL,NULL,3); -- -- Table structure for table '__Nodes__' -- CREATE TABLE __Nodes__ ( id int(10) unsigned NOT NULL auto_increment, node int(4) unsigned NOT NULL default '0', nodec int(1) unsigned NOT NULL default '0', type enum('uri','literal','bnode','table') default NULL, hash varchar(32) NOT NULL default '', str varchar(255) NOT NULL default '', big int(10) unsigned default NULL, attribOrDT int(10) unsigned NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY u_node_nodec (node,nodec), UNIQUE KEY u_hash (type,hash), UNIQUE KEY u_type_str_big_attribOrDT (type,str,big,attribOrDT) ) TYPE=MyISAM; -- -- Dumping data for table '__Nodes__' -- INSERT INTO __Nodes__ VALUES (265,521921737,0,'uri','a993295912763ca6dbfc96b31f1be4c9','http://example.com/billing#dontTell',NULL,0); INSERT INTO __Nodes__ VALUES (266,1413137867,0,'table','d1d275556d424415c9aa7b29543ac5cb','Orders,id=\"3183\"',NULL,0); INSERT INTO __Nodes__ VALUES (267,945509795,0,'table','6b18f150658a259bc8ff9f0d385b55a3','Customers,id=\"1\"',NULL,0); INSERT INTO __Nodes__ VALUES (268,4036271407,0,'uri','c53e2787d7abb196ca542817f0949d2f','fake:/W3C::Rdf::SqlDB=HASH(0x88d8068)',NULL,0); INSERT INTO __Nodes__ VALUES (269,1458390077,0,'uri','529f266cde57dc96c80808b656ed443d','http://example.com/sales#marketingProfile',NULL,0); INSERT INTO __Nodes__ VALUES (270,2934389102,0,'table','f3674552ee175a08ad4db6c8aee7396e','Customers,id=\"2\"',NULL,0); INSERT INTO __Nodes__ VALUES (286,920301122,0,'bnode','424b0f19dc87e38fb5c267dc36daae42','_1:fake:/W3C::Rdf::SqlDB=HASH(0x88d8068)',NULL,2); INSERT INTO __Nodes__ VALUES (272,3347042791,0,'uri','5e6674c7ae1dd319c7306c77c77fd1e7','http://example.com/sales#id',NULL,0); INSERT INTO __Nodes__ VALUES (273,3051706536,0,'uri','c3436bcb1a7f0283e3d80cd5b5e558a8','http://example.com/sales#suburbanDad',NULL,0); INSERT INTO __Nodes__ VALUES (274,2745839183,0,'uri','d75052e90e75e096a1e2aecfa3aa2e4f','http://example.com/sales#age',NULL,0); INSERT INTO __Nodes__ VALUES (275,3375261661,0,'uri','0ebe96c7396884ec39ea3d0cc92e67dd','http://www.w3.org/2001/XMLSchema#int',NULL,0); INSERT INTO __Nodes__ VALUES (276,1102071125,0,'literal','6152bbd954a78ea1254f9aff41b04555','275P:40',NULL,275); INSERT INTO __Nodes__ VALUES (277,1117675365,0,'uri','76435210e60ff218f11cb8d3429e5f65','http://example.com/sales#desc',NULL,0); INSERT INTO __Nodes__ VALUES (278,277911610,0,'literal','083b45594be0135d32365b3d1090983a','P:suburban dad',NULL,0); INSERT INTO __Nodes__ VALUES (279,2872298667,0,'uri','3c7dedb10bf52f57e36c44ceab33ccab','http://example.com/sales#markup',NULL,0); INSERT INTO __Nodes__ VALUES (280,665233292,0,'literal','623ffd40a7616593704f8fa027a6a78c','Xen-US:super dad',NULL,0); INSERT INTO __Nodes__ VALUES (281,3153352053,0,'literal','f82fe6dce04ef5b0272d84ccbbf45575','Xfr:papa superbe',NULL,0); INSERT INTO __Nodes__ VALUES (282,1931923247,0,'literal','9b472426fd135b5178339fff7326cf2f','Xx-pig-latin:upersay addsay',NULL,0); INSERT INTO __Nodes__ VALUES (283,4213745315,0,'uri','0498adc71af3ac1762520a75fb28a6a3','http://example.com/sales#longDesc',NULL,0); INSERT INTO __Nodes__ VALUES (284,698879031,0,'literal','6817a77b75c731516c94326229a80c37','SELECT str FROM __Big__ WHERE id=19',19,0); INSERT INTO __Nodes__ VALUES (287,204706399,0,'uri','c74e2b735dd8dc85ad0ee3510c33925f','http://www.w3.org/1999/02/22-rdf-syntax-ns#type',NULL,0); INSERT INTO __Nodes__ VALUES (288,1475410689,0,'uri','66ae675676c54db123accd4757f0fb01','http://iggy.w3.org/annotations/annotation/1052587433.529382',NULL,0); INSERT INTO __Nodes__ VALUES (289,3986698623,0,'uri','acef97e962dd06905694368feda0317f','http://www.w3.org/2000/10/annotation-ns#Annotation',NULL,0); INSERT INTO __Nodes__ VALUES (290,674090084,0,'uri','42d75951519837ca3f201396282dcc64','file:../test/Annotation1052587433.529382.rdf',NULL,0); INSERT INTO __Nodes__ VALUES (291,312191498,0,'uri','3b4aaedf762b1aec25eccbfe129baa0a','http://purl.org/dc/elements/1.0/title',NULL,0); INSERT INTO __Nodes__ VALUES (292,4146229868,0,'literal','8aa87527a1be934a0ee7252af722726c','P:Annotation of Eric\'s Homepage',NULL,0); INSERT INTO __Nodes__ VALUES (293,2369461754,0,'uri','ddb55f1d54598bb5120e03548d3b1dfa','http://www.w3.org/2000/10/annotation-ns#context',NULL,0); INSERT INTO __Nodes__ VALUES (294,2793789278,0,'literal','907adae39f06b8f74c5a8dd3a685d75e','P:http://www.w3.org/People/Eric/#xpointer(/html[1])',NULL,0); INSERT INTO __Nodes__ VALUES (295,3752686818,0,'uri','4765d0cd0acf3b629b0af88fdfad74e2','http://www.w3.org/2000/10/annotation-ns#created',NULL,0); INSERT INTO __Nodes__ VALUES (296,2779842460,0,'literal','f9002787455f33579be685c1a5b1079c','P:2003-05-10T13:22:50-05:00',NULL,0); INSERT INTO __Nodes__ VALUES (297,70778754,0,'uri','e7ea0fb94e47ff14335e01980437ff82','http://purl.org/dc/elements/1.0/date',NULL,0); INSERT INTO __Nodes__ VALUES (298,506646746,0,'literal','a503b2978438d5ea9d75214b1e32d0da','P:2003-05-10T13:23:38-05:00',NULL,0); INSERT INTO __Nodes__ VALUES (299,1008186191,0,'uri','8056ba84c24b8f6a3098f50b3c17b34f','http://purl.org/dc/elements/1.0/creator',NULL,0); INSERT INTO __Nodes__ VALUES (300,1228059441,0,'literal','bfdaca2a36978cfa8bdebeea4932b331','P:eric',NULL,0); INSERT INTO __Nodes__ VALUES (301,2350740501,0,'uri','5a57811b2e27c10052c3916f8c1d7415','http://www.w3.org/2000/10/annotation-ns#annotates',NULL,0); INSERT INTO __Nodes__ VALUES (302,3506052897,0,'uri','acd232958e30dba807a7cdc2d0fa1f21','http://www.w3.org/People/Eric/',NULL,0); INSERT INTO __Nodes__ VALUES (303,1907143196,0,'uri','93911c4322d01104748a861871acb21c','http://www.w3.org/2000/10/annotation-ns#body',NULL,0); INSERT INTO __Nodes__ VALUES (304,3325145090,0,'uri','b78504edfb4bfdd9c5a1ccc7c631b002','http://iggy.w3.org/annotations/body/1052587433.529382',NULL,0); INSERT INTO __Nodes__ VALUES (378,2721821719,0,'uri','595e0f32c514bbedd25fde2ca23bb417','http://www.w3.org/1999/xx/http#ContentType',NULL,0); INSERT INTO __Nodes__ VALUES (306,503731721,0,'uri','999488e9874569d317a88fe71e065609','http://www.w3.org/2000/10/annotation-ns#Given',NULL,0); INSERT INTO __Nodes__ VALUES (307,3407869935,0,'literal','ca0d8171fccdb16c92614118cb1ff7ef','P:????',NULL,0); INSERT INTO __Nodes__ VALUES (308,3777739634,0,'uri','c7d83c0972e93a9cde10443ee12bbb72','http://www.w3.org/2000/10/annotation-ns#Family',NULL,0); INSERT INTO __Nodes__ VALUES (309,3629480681,0,'literal','b6f16a191e54109514b8eff5d8557ae9','P:Prud\'hommeaux',NULL,0); INSERT INTO __Nodes__ VALUES (310,2030972306,0,'uri','9f16d60c84ad22a4a944df14790e2d92','http://www.w3.org/2000/10/annotation-ns#Email',NULL,0); INSERT INTO __Nodes__ VALUES (311,822478669,0,'uri','44e7d12a9ddf95bc3658b45e3106074d','mailto:eric+annotate@stripped',NULL,0); INSERT INTO __Nodes__ VALUES (312,1713357468,0,'uri','3e6d42fed4c9e8e51b587b89661fc29c','http://www.w3.org/2000/10/annotation-ns#Attribution',NULL,0); INSERT INTO __Nodes__ VALUES (313,247537648,0,'uri','551db6bd7f4c8a5debac0d900ec11ff0','http://iggy.w3.org/annotations/attribution/1052587433.529382',NULL,0); INSERT INTO __Nodes__ VALUES (314,87395216,0,'uri','866d2823d886e2a17b68844b05358b90','http://www.w3.org/2000/10/annotationType#Comment',NULL,0); INSERT INTO __Nodes__ VALUES (315,3436856321,0,'uri','f9d38fc49daf5074a48da031ccda4401','http://iggy.w3.org/annotations/annotation/1054553215.108988',NULL,0); INSERT INTO __Nodes__ VALUES (316,1398790875,0,'literal','0ee03d3412a69e6eff48ebc3535fdadb','P:http://www.w3.org/People/Eric/#xpointer(/html[1]/body[1]/p[2]/a[9])',NULL,0); INSERT INTO __Nodes__ VALUES (317,3858353486,0,'literal','7499bf7820cd773d8ec57933e5f9cd4e','P:2003-06-02T07:26:30-05:00',NULL,0); INSERT INTO __Nodes__ VALUES (318,2425886512,0,'literal','63f2f60abdea6a1903a0203f90981730','P:2003-06-06T14:32:54',NULL,0); INSERT INTO __Nodes__ VALUES (319,3433919786,0,'uri','ce1e44dd6f2a3bb256445663ccad752a','http://iggy.w3.org/annotations/attribution/1054553215.108988',NULL,0); INSERT INTO __Nodes__ VALUES (320,3395208632,0,'uri','54ae87460aac091b465dad91ca5ec5b8','http://iggy.w3.org/annotations/body/1054553215.108988',NULL,0); INSERT INTO __Nodes__ VALUES (379,1540900050,0,'literal','f243aec238a9aa90e5073c285bd844d2','P:application/xhtml+xml',NULL,0); INSERT INTO __Nodes__ VALUES (380,2611664264,0,'uri','b709950cab9695271dd53e429baad588','http://www.w3.org/1999/xx/http#ContentLength',NULL,0); INSERT INTO __Nodes__ VALUES (381,4054382344,0,'literal','46261f46dedc61ac477d114af1a8f708','P:191',NULL,0); INSERT INTO __Nodes__ VALUES (382,1545875467,0,'uri','c8b099193cc043d0f51b47d65c24300b','http://www.w3.org/1999/xx/http#Body',NULL,0); INSERT INTO __Nodes__ VALUES (383,2695016568,0,'literal','e02ced336078d2696801e7bea0a2b078','X:\n \n \n Annotation of Eric\'s Homepage\n\n \n \n \n

this is a word

\n \n ',NULL,0); INSERT INTO __Nodes__ VALUES (418,2966408478,0,'bnode','f0852eb2b9ea6cb5481e11d1b0cfcd1e','_35:file:../test/Annotation1052587433.529382.rdf',NULL,3); INSERT INTO __Nodes__ VALUES (385,2794180798,0,'literal','1773ed0fff99acbc362559d2a68bd0be','P:application/xhtml',NULL,0); INSERT INTO __Nodes__ VALUES (386,2775708285,0,'literal','2f4478789fdcd827c988f101a571f27d','P:195',NULL,0); INSERT INTO __Nodes__ VALUES (387,1866287438,0,'literal','d728366f2d630bc800f9011b6f3d494e','X:\n \n\n \n Annotation of Eric\'s Homepage\n \n \n \n

needs useful clarification, already

\n \n ',NULL,0); INSERT INTO __Nodes__ VALUES (417,2352661404,0,'bnode','e37941b8d4702b612151205f8c3ac39c','_15:file:../test/Annotation1052587433.529382.rdf',NULL,3); --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=fastQuery mysql> SELECT __Holds___0.id AS __Holds___0_annotation_id, __Holds___1.id AS __Holds___1_annotation_id, __Holds___2.id AS __Holds___2_annotation_id, __Holds___3.id AS __Holds___3_annotation_id, __Holds___4.id AS __Holds___4_body_id FROM __Holds__ AS __Holds___0 INNER JOIN __Holds__ AS __Holds___1 ON __Holds___1.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___2 ON __Holds___2.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___3 ON __Holds___3.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___4 ON __Holds___4.s=__Holds___3.o WHERE __Holds___0.p=204706399 AND __Holds___0.o=3986698623 AND __Holds___1.p=2350740501 AND __Holds___2.p=2369461754 AND __Holds___3.p=1907143196 AND __Holds___4.p=1545875467; +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | __Holds___0_annotation_id | __Holds___1_annotation_id | __Holds___2_annotation_id | __Holds___3_annotation_id | __Holds___4_body_id | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | 1640 | 1651 | 1642 | 1646 | 1649 | | 1657 | 1669 | 1659 | 1665 | 1668 | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ 2 rows in set (0.00 sec) mysql> SELECT __Holds___0.id AS __Holds___0_annotation_id, __Holds___1.id AS __Holds___1_annotation_id, __Holds___2.id AS __Holds___2_annotation_id, __Holds___3.id AS __Holds___3_annotation_id, __Holds___4.id AS __Holds___4_body_id FROM __Holds__ AS __Holds___0 INNER JOIN __Holds__ AS __Holds___1 ON __Holds___1.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___2 ON __Holds___2.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___3 ON __Holds___3.s=__Holds___0.s INNER JOIN __Holds__ AS __Holds___4 ON __Holds___4.s=__Holds___3.o WHERE __Holds___0.p=204706399 AND __Holds___0.o=3986698623 AND __Holds___1.p=2350740501 AND __Holds___2.p=2369461754 AND __Holds___3.p=1907143196 AND __Holds___4.p=1545875467; +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | __Holds___0_annotation_id | __Holds___1_annotation_id | __Holds___2_annotation_id | __Holds___3_annotation_id | __Holds___4_body_id | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ | 1640 | 1651 | 1642 | 1646 | 1649 | | 1657 | 1669 | 1659 | 1665 | 1668 | +---------------------------+---------------------------+---------------------------+---------------------------+---------------------+ 2 rows in set (0.00 sec) --8t9RHnE3ZwKMSgU+--