{"id":3986,"date":"2011-07-05T14:12:37","date_gmt":"2011-07-05T08:42:37","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=3986"},"modified":"2012-09-23T18:04:32","modified_gmt":"2012-09-23T12:34:32","slug":"batch-update-performance-enhancements-using-sql-withbatch","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/","title":{"rendered":"Batch update performance enhancements using SQL withBatch()"},"content":{"rendered":"<p>Hi guys,<br \/>\n<br \/>\nRecently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy&#8217;s Sql class. The initial strategy involved creating prepared statements and executing individual insert\/update statements for each record that needed to be inserted\/updated in the new SQLite database.<br \/>\n<br \/>\nHowever the process was taking longer than expected, and the cumulative time taken for the whole application to sync less than 30 classes was coming to be more than 2 minutes. This time taken was extremely high regarding the context of the application and was a real performance bottleneck. What I did notice was that the insert statements were identical for a particular class, disregarding the values that needed to be inserted. The same was the case with the update statements.<br \/>\n<br \/>\nAfter looking through the Sql GDK, I found a method named <em>Sql.withBatch()<\/em> that performs batch manipulation of records in a database. See the following code for illustration:<br \/>\n<br \/>\n[code]<br \/>\nSql sql = Sql.newInstance(&quot;jdbc:sqlite:\/home\/ron\/Desktop\/test.db&quot;, &quot;org.sqlite.JDBC&quot;)<br \/>\nsql.execute(&quot;create table dummyTable(number)&quot;)<br \/>\nLong startTime = System.currentTimeMillis()<br \/>\n100.times {<br \/>\n     sql.execute(&quot;insert into dummyTable(number) values(${it})&quot;)<br \/>\n}<br \/>\nLong endTime = System.currentTimeMillis()<\/p>\n<p>println &quot;Time taken: &quot; + ((endTime &#8211; startTime)\/1000)<br \/>\n[\/code]<br \/>\n<br \/>\nThe output of the above code comes out to be 14.313 seconds. That is to execute 100 insert statements with only a single attribute, it would take around 15 seconds. The time taken to insert records is dependent on the number of records being inserted and increases exponentially. Clearly a performance bottleneck in any application involving batch inserts and updates.<br \/>\n<br \/>\nLet us consider the same code and the performance with the <em>withBatch()<\/em> closure.<br \/>\n[code]<br \/>\nSql sql = Sql.newInstance(&quot;jdbc:sqlite:\/home\/ron\/Desktop\/test.db&quot;, &quot;org.sqlite.JDBC&quot;)<br \/>\nsql.execute(&quot;create table dummyTable(number)&quot;)<br \/>\nLong startTime = System.currentTimeMillis()<br \/>\nsql.withBatch {stmt-&gt;<br \/>\n    100.times {<br \/>\n      stmt.addBatch(&quot;insert into dummyTable(number) values(${it})&quot;)<br \/>\n    }<br \/>\n    stmt.executeBatch()<br \/>\n}<br \/>\nLong endTime = System.currentTimeMillis()<br \/>\nprintln &quot;Time taken: &quot; + ((endTime &#8211; startTime)\/1000)<br \/>\n[\/code]<br \/>\n<br \/>\nThe time taken with the above code comes out to be 0.103 seconds! A remarkable performance improvement over the conventional method of inserting records using the execute() method.<br \/>\n<br \/>\nThe only drawback with using the <em>withBatch()<\/em> closure is that it does not allow prepared statements to be added to the batch. This limits the use of batch statements as we have to manually create insert or update statements.<br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy&#8217;s Sql class. The initial strategy involved creating prepared statements and executing individual [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":29,"footnotes":""},"categories":[7],"tags":[609,610,558,608],"class_list":["post-3986","post","type-post","status-publish","format-standard","hentry","category-grails","tag-batch-update-and-insert","tag-groovy-sql","tag-sql","tag-withbatch"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy&#039;s Sql class. The initial strategy involved creating prepared statements and executing individual\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Roni C Thomas\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy&#039;s Sql class. The initial strategy involved creating prepared statements and executing individual\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy&#039;s Sql class. The initial strategy involved creating prepared statements and executing individual\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#article\",\"name\":\"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog\",\"headline\":\"Batch update performance enhancements using SQL withBatch()\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/roni\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-07-05T14:12:37+05:30\",\"dateModified\":\"2012-09-23T18:04:32+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#webpage\"},\"articleSection\":\"Grails, batch update and insert, groovy sql, SQL, withBatch\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#listItem\",\"name\":\"Batch update performance enhancements using SQL withBatch()\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#listItem\",\"position\":3,\"name\":\"Batch update performance enhancements using SQL withBatch()\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/roni\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/roni\\\/\",\"name\":\"Roni C Thomas\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/7919dc04-af55-404b-bae5-eee87d6a016f_132-Roni-C-Thomas-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Roni C Thomas\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/\",\"name\":\"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog\",\"description\":\"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy's Sql class. The initial strategy involved creating prepared statements and executing individual\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/batch-update-performance-enhancements-using-sql-withbatch\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/roni\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/roni\\\/#author\"},\"datePublished\":\"2011-07-05T14:12:37+05:30\",\"dateModified\":\"2012-09-23T18:04:32+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog","description":"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy's Sql class. The initial strategy involved creating prepared statements and executing individual","canonical_url":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#article","name":"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog","headline":"Batch update performance enhancements using SQL withBatch()","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/roni\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2011-07-05T14:12:37+05:30","dateModified":"2012-09-23T18:04:32+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#webpage"},"articleSection":"Grails, batch update and insert, groovy sql, SQL, withBatch"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#listItem","name":"Batch update performance enhancements using SQL withBatch()"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#listItem","position":3,"name":"Batch update performance enhancements using SQL withBatch()","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/roni\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/roni\/","name":"Roni C Thomas","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/7919dc04-af55-404b-bae5-eee87d6a016f_132-Roni-C-Thomas-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Roni C Thomas"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/","name":"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog","description":"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy's Sql class. The initial strategy involved creating prepared statements and executing individual","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/roni\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/roni\/#author"},"datePublished":"2011-07-05T14:12:37+05:30","dateModified":"2012-09-23T18:04:32+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog","og:description":"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy's Sql class. The initial strategy involved creating prepared statements and executing individual","og:url":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Batch update performance enhancements using SQL withBatch() | TO THE NEW Blog","twitter:description":"Hi guys, Recently as part of a project, I had to populate a SQLite database with large amounts of data pertaining to a number of classes requiring more than 5000 inserts and updates per class. I created a new SQLite database using Groovy's Sql class. The initial strategy involved creating prepared statements and executing individual","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"3986","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 13:53:32","updated":"2024-02-29 08:54:26","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tBatch update performance enhancements using SQL withBatch()\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"Batch update performance enhancements using SQL withBatch()","link":"https:\/\/www.tothenew.com\/blog\/batch-update-performance-enhancements-using-sql-withbatch\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/3986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=3986"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/3986\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=3986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=3986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=3986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}