{"id":2155,"date":"2016-02-04T21:19:09","date_gmt":"2016-02-04T21:19:09","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2155"},"modified":"2025-06-13T20:20:34","modified_gmt":"2025-06-14T03:20:34","slug":"prepared-statements-in-couchbase-by-the-numbers","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/prepared-statements-in-couchbase-by-the-numbers\/","title":{"rendered":"Declaraciones preparadas: \u00a1en cifras!"},"content":{"rendered":"<h2><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/february\/prepared-statements-in-couchbase-by-the-numbers\/f_psb.jpg\" \/><\/h2>\n<h2>Siempre preparados....<\/h2>\n<p>En nuestro \u00faltimo <a href=\"https:\/\/www.couchbase.com\/blog\/es\/prepare-for-performance\/\">debate<\/a> sobre sentencias preparadas en Couchbase hablamos sobre las ganancias de rendimiento que son posibles usando sentencias preparadas. Pens\u00e9 en publicar una \"secuela\" con algunos ejemplos del mundo real y los n\u00fameros utilizando el conjunto de datos de viaje-muestra incluido que viene con Couchbase.<\/p>\n<h2>Un an\u00e1lisis sencillo<\/h2>\n<p>En el gist de abajo, utilic\u00e9 un simple bucle de control para simular la carga contra couchbase ejecut\u00e1ndose en mi port\u00e1til. Examin\u00e9 el rendimiento de varias consultas: algunas con parametrizaci\u00f3n, diferentes estrategias de predicado, uniones y una mezcla de campos indexados y no indexados. Los resultados son impresionantes, y me demostraron que se pueden obtener ganancias sustanciales utilizando sentencias preparadas en la mayor\u00eda de los casos. Todav\u00eda estamos prisioneros de las leyes de la f\u00edsica cuando se requieren cosas como escaneos completos de \u00edndices primarios para devolver resultados, pero en <strong>m\u00e1s<\/strong> En la medida de lo posible, deben utilizarse las declaraciones preparadas para cada situaci\u00f3n con el fin de aumentar el rendimiento.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/ToddGreenstein\/2763705341dd317240e3.js\"><\/script><\/p>","protected":false},"excerpt":{"rendered":"<p>Always be Prepared&#8230;. In our last discussion on prepared statements in couchbase we talked about the performance gains that are possible using prepared statements. I thought I&#8217;d post a &#8220;sequel&#8221; with a few real world examples and numbers using the [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[9417,1822,1812],"tags":[],"ppma_author":[9019],"class_list":["post-2155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance","category-node-js","category-n1ql-query"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Prepared Statements - by the Numbers! - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/es\/prepared-statements-in-couchbase-by-the-numbers\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prepared Statements - by the Numbers!\" \/>\n<meta property=\"og:description\" content=\"Always be Prepared&#8230;. In our last discussion on prepared statements in couchbase we talked about the performance gains that are possible using prepared statements. I thought I&#8217;d post a &#8220;sequel&#8221; with a few real world examples and numbers using the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/prepared-statements-in-couchbase-by-the-numbers\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-04T21:19:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T03:20:34+00:00\" \/>\n<meta name=\"author\" content=\"Todd Greenstein\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@todd_greenstein\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Todd Greenstein\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/\"},\"author\":{\"name\":\"Todd Greenstein\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/64b5d1e5969768c5d63c11c696951ed3\"},\"headline\":\"Prepared Statements &#8211; by the Numbers!\",\"datePublished\":\"2016-02-04T21:19:09+00:00\",\"dateModified\":\"2025-06-14T03:20:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/\"},\"wordCount\":157,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"High Performance\",\"Node.js\",\"SQL++ \\\/ N1QL Query\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/\",\"name\":\"Prepared Statements - by the Numbers! - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-02-04T21:19:09+00:00\",\"dateModified\":\"2025-06-14T03:20:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/1\\\/2022\\\/11\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/prepared-statements-in-couchbase-by-the-numbers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prepared Statements &#8211; by the Numbers!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/64b5d1e5969768c5d63c11c696951ed3\",\"name\":\"Todd Greenstein\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=gabfbe093983052aa28595343c19888ce\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g\",\"caption\":\"Todd Greenstein\"},\"description\":\"Todd Greenstein is a Solution Architect at Couchbase. Todd is specialize in API design, architecture, data modeling, nodejs and golang development.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/todd_greenstein\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/es\\\/author\\\/todd-greenstein\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Prepared Statements - by the Numbers! - The Couchbase Blog","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":"https:\/\/www.couchbase.com\/blog\/es\/prepared-statements-in-couchbase-by-the-numbers\/","og_locale":"es_MX","og_type":"article","og_title":"Prepared Statements - by the Numbers!","og_description":"Always be Prepared&#8230;. In our last discussion on prepared statements in couchbase we talked about the performance gains that are possible using prepared statements. I thought I&#8217;d post a &#8220;sequel&#8221; with a few real world examples and numbers using the [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/es\/prepared-statements-in-couchbase-by-the-numbers\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-02-04T21:19:09+00:00","article_modified_time":"2025-06-14T03:20:34+00:00","author":"Todd Greenstein","twitter_card":"summary_large_image","twitter_creator":"@todd_greenstein","twitter_misc":{"Written by":"Todd Greenstein","Est. reading time":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/"},"author":{"name":"Todd Greenstein","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3"},"headline":"Prepared Statements &#8211; by the Numbers!","datePublished":"2016-02-04T21:19:09+00:00","dateModified":"2025-06-14T03:20:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/"},"wordCount":157,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["High Performance","Node.js","SQL++ \/ N1QL Query"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/","url":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/","name":"Prepared Statements - by the Numbers! - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-02-04T21:19:09+00:00","dateModified":"2025-06-14T03:20:34+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/prepared-statements-in-couchbase-by-the-numbers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Prepared Statements &#8211; by the Numbers!"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/64b5d1e5969768c5d63c11c696951ed3","name":"Todd Greenstein","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=gabfbe093983052aa28595343c19888ce","url":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","caption":"Todd Greenstein"},"description":"Todd Greenstein is a Solution Architect at Couchbase. Todd is specialize in API design, architecture, data modeling, nodejs and golang development.","sameAs":["https:\/\/x.com\/todd_greenstein"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/todd-greenstein\/"}]}},"acf":[],"authors":[{"term_id":9019,"user_id":20,"is_guest":0,"slug":"todd-greenstein","display_name":"Todd Greenstein","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/f230045f7f6e636cf01abbd35f1cbf66a1206fbe149a0d4f0bbdd992c646257d?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=2155"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2155\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=2155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=2155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=2155"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=2155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}