[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"branding":3,"analytics":7,"article-new-database-writes-custom-code-per-query-cuts-cost-59":10,"sections":35},{"siteName":4,"siteTagline":5,"publisherName":4,"contactEmail":6},"The Revision","Tech news, decoded.","editor@therevision.news",{"gaMeasurementId":8,"adsenseClientId":9},"G-ZW2MV82GYR","ca-pub-8533917693782264",{"article":11},{"id":12,"slug":13,"title":14,"dek":15,"body_md":16,"tags_json":17,"published_at":18,"created_at":19,"updated_at":20,"status":21,"review_note":22,"review_notes":23,"image_url":22,"persona_id":22,"persona_name":22,"section":24,"tags":25,"sources":30,"feedback":34,"feedback_at":22,"cost_usd":34,"total_tokens":34},7805,"new-database-writes-custom-code-per-query-cuts-cost-59","New Database Writes Custom Code Per Query, Cuts Cost 59%","A research database system called KathDB generates custom code for each query on the fly, beating rivals by nearly 59% on a standard benchmark.","A database system that writes its own code while it runs just posted a 59% cost cut on a standard benchmark.\n\nResearchers built KathDB-FAO, a new way for the KathDB database to answer questions asked in plain English. Instead of running a fixed set of prewritten operations, it breaks a query into small, well-defined actions, checks what each one needs and produces, and groups the compatible ones together. Then, for each group, it generates - synthesizes - a custom piece of code on the spot, tailored to that specific query. Tested against other systems on the SemBench benchmark, it cut execution cost by 58.8% on average, without sacrificing answer quality.\n\nMost databases run one of a handful of generic strategies no matter what you ask, which wastes cycles on questions that don't need the full machinery. Writing bespoke code per query - rather than picking from a preset menu - is a bet that generated code can beat hand-tuned code, at least for now. If that holds up outside a single benchmark, it is a meaningful shift in how databases that handle natural-language queries get built.\n\nOne benchmark and one lab's numbers are not proof of a trend - and 'writes its own code for every query' is also exactly the kind of complexity that tends to bite back in production.","[\"databases\",\"query-optimization\",\"code-synthesis\",\"benchmarks\"]","2026-09-25T04:00:00.000Z","2026-09-26T00:08:52.156Z","2026-09-26T00:08:58.870Z","published",null,[],"ai",[26,27,28,29],"databases","query-optimization","code-synthesis","benchmarks",[31],{"name":32,"url":33},"arXiv cs.AI","https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.28761",0,{"sections":36},[37,41,46,51,56,61,66,71,76,81,86,91,96,101],{"name":38,"slug":24,"count":39,"latest_published_at":40},"AI",4527,"2026-09-25T16:31:14.000Z",{"name":42,"slug":43,"count":44,"latest_published_at":45},"Security","security",741,"2026-09-25T15:52:13.000Z",{"name":47,"slug":48,"count":49,"latest_published_at":50},"Policy","policy",390,"2026-09-25T16:24:59.000Z",{"name":52,"slug":53,"count":54,"latest_published_at":55},"Deals","deals",256,"2026-09-25T17:00:53.000Z",{"name":57,"slug":58,"count":59,"latest_published_at":60},"Hardware","hardware",185,"2026-09-25T15:00:22.000Z",{"name":62,"slug":63,"count":64,"latest_published_at":65},"Science","science",140,"2026-09-25T11:55:23.000Z",{"name":67,"slug":68,"count":69,"latest_published_at":70},"Consumer Tech","consumer-tech",132,"2026-09-25T15:30:00.000Z",{"name":72,"slug":73,"count":74,"latest_published_at":75},"Software","software",88,"2026-09-24T23:06:55.000Z",{"name":77,"slug":78,"count":79,"latest_published_at":80},"Dev Tools","dev-tools",82,"2026-09-25T09:59:40.000Z",{"name":82,"slug":83,"count":84,"latest_published_at":85},"Startups","startups",76,"2026-09-25T18:33:59.000Z",{"name":87,"slug":88,"count":89,"latest_published_at":90},"Gaming","gaming",48,"2026-09-25T18:35:21.000Z",{"name":92,"slug":93,"count":94,"latest_published_at":95},"General","general",46,"2026-09-25T02:12:57.000Z",{"name":97,"slug":98,"count":99,"latest_published_at":100},"Reviews","reviews",30,"2026-09-24T20:07:31.000Z",{"name":102,"slug":103,"count":104,"latest_published_at":105},"How-To","how-to",6,"2026-06-16T09:00:00.000Z"]