{"id":225,"date":"2016-11-25T12:16:23","date_gmt":"2016-11-25T18:16:23","guid":{"rendered":"http:\/\/www.aamirharoon.com\/?p=225"},"modified":"2020-10-31T00:40:49","modified_gmt":"2020-10-31T05:40:49","slug":"correlated-subquery-analytics","status":"publish","type":"post","link":"http:\/\/www.aamirharoon.com\/?p=225","title":{"rendered":"Correlated Subquery to Analytics"},"content":{"rendered":"<p>At work I came across a query that was using <a href=\"https:\/\/blogs.oracle.com\/optimizer\/entry\/optimizer_transformations_subquery_unesting_part_1\" target=\"_blank\" rel=\"noopener noreferrer\">correlated sub select<\/a> and I thought it is worth sharing.  I have seen many queries where correlated sub select is used which can easily be written using analytics.  In this particular query correlated was used to select rows with maximum effective date for every contrived key and category.  This query was taking anywhere between 2-4 seconds to complete.  I was able to re-write this query using analytics and brought the execution time to less than 500 milliseconds.<\/p>\n<p>I&#8217;ll demonstrate by re-generating the similar situation.<\/p>\n<p>Let&#8217;s create a members table:<\/p>\n<pre class=\"brush: sql; gutter: false; title: ; notranslate\" title=\"\">\n\nSQL&amp;gt; drop table members;\n\nTable dropped.\n\nSQL&amp;gt;\nSQL&amp;gt; create table members (\n2    Member_ID varchar2(10),\n3    member_ck varchar2(10),\n4    Category char(1),\n5    eff_date date\n6    ) ;\n\nTable created.\n\n<\/pre>\n<p>Now load some data into members table:<\/p>\n<pre class=\"brush: sql; gutter: false; title: ; notranslate\" title=\"\">\nSQL&amp;gt; insert into members values ('A','1','Z',sysdate) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','1','Z',sysdate-5) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','1','X',sysdate) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','1','X',sysdate-5) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','2','Z',sysdate-90) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','2','Z',sysdate-100) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','2','X',sysdate-80) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('A','2','X',sysdate-150) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('B','3','Z',sysdate-90) ;\n\n1 row created.\n\nSQL&amp;gt;\nSQL&amp;gt; insert into members values ('B','3','X',sysdate-200) ;\n\n1 row created.\n\nSQL&amp;gt; commit;\n<\/pre>\n<p>Following are rows for member &#8216;A.&#8217;  From this data set we need to select rownum 1,3,5 and 7.  These are rows with maximum eff_date for member_ck and category.<\/p>\n<pre class=\"brush: sql; gutter: false; highlight: [7,9,11,13]; title: ; notranslate\" title=\"\">\n\nSQL&amp;gt; select rownum, member_id, member_ck, category, eff_date\n2  from members a where member_id = 'A'\n3  ;\n\nROWNUM MEMBER_ID  MEMBER_CK  C EFF_DATE\n---------- ---------- ---------- - ---------\n1 A\t      1 \t\t Z 24-NOV-16\n2 A\t      1 \t\t Z 19-NOV-16\n3 A\t      1 \t\t X 24-NOV-16\n4 A\t      1 \t\t X 19-NOV-16\n5 A\t      2 \t\t Z 26-AUG-16\n6 A\t      2 \t\t Z 16-AUG-16\n7 A\t      2 \t\t X 05-SEP-16\n8 A\t      2 \t\t X 27-JUN-16\n\n8 rows selected.\n\n<\/pre>\n<p>Following correlated sub query gets the rows that we are interested in.  But as table grows, this will take long time to complete.  You can see this from the explain plan.  Optimizer needs to do full table scan twice, 31 recursive calls and 101 consistent gets.<\/p>\n<pre class=\"brush: sql; gutter: false; title: ; notranslate\" title=\"\">\n\nSQL&amp;gt; set autotrace on\nSQL&amp;gt;\nSQL&amp;gt; SELECT member_id,\n2    member_ck,\n3    category,\n4    eff_date\n5  FROM members a\n6  WHERE member_id = 'A'\n7  AND eff_date   IN\n8    (SELECT MAX(eff_date)\n9    FROM members b\n10    WHERE b.member_ck = a.member_ck\n11    AND b.category\t = a.category\n12    AND b.member_id\t = a.member_id\n13    )\n14  ORDER BY member_id,\n15    member_ck,\n16    category,\n17    eff_date ;\n\nMEMBER_ID  MEMBER_CK  C EFF_DATE\n---------- ---------- - ---------\nA\t\t   1\t      X 24-NOV-16\nA\t\t   1\t      Z 24-NOV-16\nA\t\t   2\t      X 05-SEP-16\nA\t\t   2\t      Z 26-AUG-16\n\nElapsed: 00:00:00.04\n\nExecution Plan\n----------------------------------------------------------\nPlan hash value: 3201527363\n\n--------------------------------------------------------------------------------\n| Id  | Operation\t \t     | Name    | Rows  | Bytes | Cost (%CPU)| Time     |\n--------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT     |\t       |     6 |   156 |    12\t (9)| 00:00:01 |\n|   1 |  SORT ORDER BY\t     |\t       |     6 |   156 |    12\t (9)| 00:00:01 |\n|*  2 |   FILTER\t\t     |\t       |       |       |\t    \t|\t       |\n|*  3 |    TABLE ACCESS FULL | MEMBERS |     8 |   208 |     3\t (0)| 00:00:01 |\n|   4 |    SORT AGGREGATE    |\t       |     1 |    26 |\t\t    |\t       |\n|*  5 |     TABLE ACCESS FULL| MEMBERS |     1 |    26 |     3\t (0)| 00:00:01 |\n--------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n2 - filter(&quot;EFF_DATE&quot;= (SELECT MAX(&quot;EFF_DATE&quot;) FROM &quot;MEMBERS&quot; &quot;B&quot;\nWHERE &quot;B&quot;.&quot;MEMBER_CK&quot;=:B1 AND &quot;B&quot;.&quot;MEMBER_ID&quot;=:B2 AND\n&quot;B&quot;.&quot;CATEGORY&quot;=:B3))\n3 - filter(&quot;MEMBER_ID&quot;='A')\n5 - filter(&quot;B&quot;.&quot;MEMBER_CK&quot;=:B1 AND &quot;B&quot;.&quot;MEMBER_ID&quot;=:B2 AND\n&quot;B&quot;.&quot;CATEGORY&quot;=:B3)\n\nNote\n-----\n- dynamic statistics used: dynamic sampling (level=2)\n\nStatistics\n----------------------------------------------------------\n31  recursive calls\n2  db block gets\n101  consistent gets\n0  physical reads\n0  redo size\n862  bytes sent via SQL*Net to client\n551  bytes received via SQL*Net from client\n2  SQL*Net roundtrips to\/from client\n4  sorts (memory)\n0  sorts (disk)\n4  rows processed\n\n<\/pre>\n<p>Now let&#8217;s re-write using analytics function max() over (partition by) clause.  Note the cost is much less and same result is achieved by only doing 5 recursive calls and 15 consistent gets.  Clearly running this query is much cheaper than correlated sub select.<\/p>\n<pre class=\"brush: sql; gutter: false; title: ; notranslate\" title=\"\">\nSQL&amp;gt;\nSQL&amp;gt; SELECT m.member_id,\n2    m.member_ck,\n3    m.category,\n4    m.eff_date\n5  FROM\n6    (SELECT member_id,\n7  \t member_ck,\n8  \t category,\n9  \t eff_date,\n10  \t MAX(eff_date) over (partition BY category, member_ck) max_eff_date\n11    FROM members\n12    WHERE member_id = 'A'\n13    ) m\n14  WHERE m.max_eff_date = m.eff_date\n15  ORDER BY m.member_id,\n16    m.member_ck,\n17    m.category,\n18    m.eff_date ;\n\nMEMBER_ID  MEMBER_CK  C EFF_DATE\n---------- ---------- - ---------\nA\t\t   1\t\t  X 24-NOV-16\nA\t\t   1\t\t  Z 24-NOV-16\nA\t\t   2\t\t  X 05-SEP-16\nA\t\t   2\t\t  Z 26-AUG-16\n\nElapsed: 00:00:00.00\n\nExecution Plan\n----------------------------------------------------------\nPlan hash value: 3057722337\n\n--------------------------------------------------------------------------------\n| Id  | Operation\t    \t | Name    | Rows  | Bytes | Cost (%CPU)| Time     |\n--------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT     |\t       |     8 |   280 |     5\t(40)| 00:00:01 |\n|   1 |  SORT ORDER BY\t     |\t       |     8 |   280 |     5\t(40)| 00:00:01 |\n|*  2 |   VIEW\t\t\t     |\t       |     8 |   280 |     4\t(25)| 00:00:01 |\n|   3 |    WINDOW SORT\t     |\t       |     8 |   208 |     4\t(25)| 00:00:01 |\n|*  4 |     TABLE ACCESS FULL| MEMBERS |     8 |   208 |     3\t (0)| 00:00:01 |\n--------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n2 - filter(&quot;M&quot;.&quot;MAX_EFF_DATE&quot;=&quot;M&quot;.&quot;EFF_DATE&quot;)\n4 - filter(&quot;MEMBER_ID&quot;='A')\n\nNote\n-----\n- dynamic statistics used: dynamic sampling (level=2)\n\nStatistics\n----------------------------------------------------------\n5  recursive calls\n0  db block gets\n15  consistent gets\n0  physical reads\n0  redo size\n862  bytes sent via SQL*Net to client\n551  bytes received via SQL*Net from client\n2  SQL*Net roundtrips to\/from client\n2  sorts (memory)\n0  sorts (disk)\n4  rows processed\n\n<\/pre>\n<p>Bottom line is to avoid writing correlated sub queries.<\/p>\n<p>I hope you found this useful.  Thank you for reading and visiting my blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work I came across a query that was using correlated sub select and I thought it is worth sharing. I have seen many queries<\/p>\n","protected":false},"author":1,"featured_media":4061,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[],"class_list":["post-225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-query-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Correlated Subquery to Analytics - The Database Handyman<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.aamirharoon.com\/?p=225\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Correlated Subquery to Analytics - The Database Handyman\" \/>\n<meta property=\"og:description\" content=\"At work I came across a query that was using correlated sub select and I thought it is worth sharing. I have seen many queries\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.aamirharoon.com\/?p=225\" \/>\n<meta property=\"og:site_name\" content=\"The Database Handyman\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-25T18:16:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-31T05:40:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png\" \/>\n\t<meta property=\"og:image:width\" content=\"630\" \/>\n\t<meta property=\"og:image:height\" content=\"340\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aamir\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@aamir814\" \/>\n<meta name=\"twitter:site\" content=\"@aamir814\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aamir\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225\"},\"author\":{\"name\":\"Aamir\",\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63\"},\"headline\":\"Correlated Subquery to Analytics\",\"datePublished\":\"2016-11-25T18:16:23+00:00\",\"dateModified\":\"2020-10-31T05:40:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225\"},\"wordCount\":975,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63\"},\"image\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png\",\"articleSection\":[\"SQL Query performance\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.aamirharoon.com\/?p=225#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225\",\"url\":\"http:\/\/www.aamirharoon.com\/?p=225\",\"name\":\"Correlated Subquery to Analytics - The Database Handyman\",\"isPartOf\":{\"@id\":\"http:\/\/www.aamirharoon.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png\",\"datePublished\":\"2016-11-25T18:16:23+00:00\",\"dateModified\":\"2020-10-31T05:40:49+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.aamirharoon.com\/?p=225\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#primaryimage\",\"url\":\"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png\",\"contentUrl\":\"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png\",\"width\":630,\"height\":340},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.aamirharoon.com\/?p=225#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.aamirharoon.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Correlated Subquery to Analytics\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.aamirharoon.com\/#website\",\"url\":\"http:\/\/www.aamirharoon.com\/\",\"name\":\"The Database Handyman\",\"description\":\"My notes about Oracle Database, APEX, OEM Cloud Control and whatever I learn\",\"publisher\":{\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.aamirharoon.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63\",\"name\":\"Aamir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cc5bb07711a1b9719cc47e13a8205072859c1aef30fac28f412baa84b9cf9b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cc5bb07711a1b9719cc47e13a8205072859c1aef30fac28f412baa84b9cf9b?s=96&d=mm&r=g\",\"caption\":\"Aamir\"},\"logo\":{\"@id\":\"http:\/\/www.aamirharoon.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.aamirharoon.com\/about\/\",\"https:\/\/x.com\/aamir814\"],\"url\":\"http:\/\/www.aamirharoon.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Correlated Subquery to Analytics - The Database Handyman","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.aamirharoon.com\/?p=225","og_locale":"en_US","og_type":"article","og_title":"Correlated Subquery to Analytics - The Database Handyman","og_description":"At work I came across a query that was using correlated sub select and I thought it is worth sharing. I have seen many queries","og_url":"http:\/\/www.aamirharoon.com\/?p=225","og_site_name":"The Database Handyman","article_published_time":"2016-11-25T18:16:23+00:00","article_modified_time":"2020-10-31T05:40:49+00:00","og_image":[{"width":630,"height":340,"url":"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png","type":"image\/png"}],"author":"Aamir","twitter_card":"summary_large_image","twitter_creator":"@aamir814","twitter_site":"@aamir814","twitter_misc":{"Written by":"Aamir","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.aamirharoon.com\/?p=225#article","isPartOf":{"@id":"http:\/\/www.aamirharoon.com\/?p=225"},"author":{"name":"Aamir","@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63"},"headline":"Correlated Subquery to Analytics","datePublished":"2016-11-25T18:16:23+00:00","dateModified":"2020-10-31T05:40:49+00:00","mainEntityOfPage":{"@id":"http:\/\/www.aamirharoon.com\/?p=225"},"wordCount":975,"commentCount":0,"publisher":{"@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63"},"image":{"@id":"http:\/\/www.aamirharoon.com\/?p=225#primaryimage"},"thumbnailUrl":"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png","articleSection":["SQL Query performance"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.aamirharoon.com\/?p=225#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.aamirharoon.com\/?p=225","url":"http:\/\/www.aamirharoon.com\/?p=225","name":"Correlated Subquery to Analytics - The Database Handyman","isPartOf":{"@id":"http:\/\/www.aamirharoon.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.aamirharoon.com\/?p=225#primaryimage"},"image":{"@id":"http:\/\/www.aamirharoon.com\/?p=225#primaryimage"},"thumbnailUrl":"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png","datePublished":"2016-11-25T18:16:23+00:00","dateModified":"2020-10-31T05:40:49+00:00","breadcrumb":{"@id":"http:\/\/www.aamirharoon.com\/?p=225#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.aamirharoon.com\/?p=225"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"http:\/\/www.aamirharoon.com\/?p=225#primaryimage","url":"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png","contentUrl":"http:\/\/www.aamirharoon.com\/wp-content\/uploads\/2016\/11\/guia-google-analytics.png","width":630,"height":340},{"@type":"BreadcrumbList","@id":"http:\/\/www.aamirharoon.com\/?p=225#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.aamirharoon.com\/"},{"@type":"ListItem","position":2,"name":"Correlated Subquery to Analytics"}]},{"@type":"WebSite","@id":"http:\/\/www.aamirharoon.com\/#website","url":"http:\/\/www.aamirharoon.com\/","name":"The Database Handyman","description":"My notes about Oracle Database, APEX, OEM Cloud Control and whatever I learn","publisher":{"@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.aamirharoon.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":["Person","Organization"],"@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/dbcd256c4a97c6e27b7cc408200a9b63","name":"Aamir","image":{"@type":"ImageObject","inLanguage":"en","@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cc5bb07711a1b9719cc47e13a8205072859c1aef30fac28f412baa84b9cf9b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cc5bb07711a1b9719cc47e13a8205072859c1aef30fac28f412baa84b9cf9b?s=96&d=mm&r=g","caption":"Aamir"},"logo":{"@id":"http:\/\/www.aamirharoon.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.aamirharoon.com\/about\/","https:\/\/x.com\/aamir814"],"url":"http:\/\/www.aamirharoon.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225"}],"version-history":[{"count":21,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":4063,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions\/4063"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=\/wp\/v2\/media\/4061"}],"wp:attachment":[{"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aamirharoon.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}