Query Planning

开源大模型Query Planning实战:Mistral+Qwen分层架构 Query Planning是大语言模型在数据库交互中的关键能力,本质是将自然语言查询转化为可执行、可验证的结构化执行契约。其核心原理在于解耦意图识别、参数填充与安全校验等原子环节,而非依赖单一大模型端到端生成SQL。技术价值体现在高确定性、低延迟、强可观测与业务规则可嵌入,广泛应用于BI增强、金融风控、医疗科研等需语义理解与数据治理并重的场景。本文基于真实生产落地经验,聚焦Mistral-7B-Instruct的函数直觉与Qwen-14B的参数精炼能力,构建轻量可控、可调试、可降级的分层Query Pla 阅读详情

Query Planning

► Table Of Contents

Overview

The best feature of SQL (in all its implementations, not just SQLite) is that it is a declarative language, not a procedural language. When programming in SQL you tell the system what you want to compute, not how to compute it. The task of figuring out the howis delegated to the query planner subsystem within the SQL database engine.

For any given SQL statement, there might be hundreds or thousands or even millions of different algorithms of performing the operation. All of these algorithms will get the correct answer, though some will run faster than others. The query planner is an AIthat tries to pick the fastest and most efficient algorithm for each SQL statement.

Most of the time, the query planner in SQLite does a good job. However, the query planner needs indices to work with. These indices must normally be added by programmers. Rarely, the query planner AI will make a suboptimal algorithm choice. In those cases, programmers may want to provide additional hints to help the query planner do a better job.

This document provides background information about how the SQLite query planner and query engine work. Programmers can use this information to help create better indexes, and provide hints to help the query planner when needed.

Additional information is provided in the SQLite query planner and next generation query planner documents.

1. Searching

1.1. Tables Without Indices

Most tables in SQLite consist of zero or more rows with a unique integer key (the rowid or INTEGER PRIMARY KEY) followed by content. (The exception is WITHOUT ROWID tables.) The rows are logically stored in order of increasing rowid. As an example, this article uses a table named "FruitsForSale" which relates various fruits to the state where they are grown and their unit price at market. The schema is this:

CREATE TABLE FruitsForSale(
  Fruit TEXT,
  State TEXT,
  Price REAL
);

With some (arbitrary) data, such a table might be logically stored on disk as shown in figure 1:

 

figure 1
Figure 1: Logical Layout Of Table "FruitsForSale"

 

In this example, the rowids are not consecutive but they are ordered. SQLite usually creates rowids beginning with one and increasing by one with each added row. But if rows are deleted, gaps can appear in the sequence. And the application can control the rowid assigned if desired, so that rows are not necessarily inserted at the bottom. But regardless of what happens, the rowids are always unique and in strictly ascending order.

Suppose you want to look up the price of peaches. The query would be as follows:

SELECT price FROM fruitsforsale WHERE fruit='Peach';

To satisfy this query, SQLite reads every row out of the table, checks to see if the "fruit" column has the value of "Peach" and if so, outputs the "price" column from that row. The process is illustrated by figure 2 below. This is algorithm is called a full table scansince the entire content of the table must be read and examined in order to find the one row of interest. With a table of only 7 rows, a full table scan is acceptable, but if the table contained 7 million rows, a full table scan might read megabytes of content in order to find a single 8-byte number. For that reason, one normally tries to avoid full table scans.

 

figure 2
Figure 2: Full Table Scan

 

1.2. Lookup By Rowid

One technique for avoiding a full table scan is to do lookups by rowid (or by the equivalent INTEGER PRIMARY KEY). To lookup the price of peaches, one would query for the entry with a rowid of 4:

SELECT price FROM fruitsforsale WHERE rowid=4;

Since the information is stored in the table in rowid order, SQLite can find the correct row using a binary search. If the table contains N element, the time required to look up the desired row is proportional to logN rather than being proportional to N as in a full table scan. If the table contains 10 million elements, that means the query will be on the order of N/logN or about 1 million times faster.

 

figure 3
Figure 3: Lookup By Rowid

 

1.3. Lookup By Index

The problem with looking up information by rowid is that you probably do not care what the price of "item 4" is - you want to know the price of peaches. And so a rowid lookup is not helpful.

To make the original query more efficient, we can add an index on the "fruit" column of the "fruitsforsale" table like this:

CREATE INDEX Idx1 ON fruitsforsale(fruit);

An index is another table similar to the original "fruitsforsale" table but with the content (the fruit column in this case) stored in front of the rowid and with all rows in content order. Figure 4 gives a logical view of the Idx1 index. The "fruit" column is the primary key used to order the elements of the table and the "rowid" is the secondary key used to break the tie when two or more rows have the same "fruit". In the example, the rowid has to be used as a tie-breaker for the "Orange" rows. Notice that since the rowid is always unique over all elements of the original table, the composite key of "fruit" followed by "rowid" will be unique over all elements of the index.

 

figure 4
Figure 4: An Index On The Fruit Column

 

This new index can be used to implement a faster algorithm for the original "Price of Peaches" query.

SELECT price FROM fruitsforsale WHERE fruit='Peach';

The query starts by doing a binary search on the Idx1 index for entries that have fruit='Peach'. SQLite can do this binary search on the Idx1 index but not on the original FruitsForSale table because the rows in Idx1 are sorted by the "fruit" column. Having found a row in the Idx1 index that has fruit='Peach', the database engine can extract the rowid for that row. Then the database engines does a second binary search on the original FruitsForSale table to find the original row that contains fruit='Peach'. From the row in the FruitsForSale table, SQLite can then extract the value of the price column. This procedure is illustrated by figure 5.

 

figure 5
Figure 5: Indexed Lookup For The Price Of Peaches

 

SQLite has to do two binary searches to find the price of peaches using the method show above. But for a table with a large number of rows, this is still much faster than doing a full table scan.

1.4. Multiple Result Rows

In the previous query the fruit='Peach' constraint narrowed the result down to a single row. But the same technique works even if multiple rows are obtained. Suppose we looked up the price of Oranges instead of Peaches:

SELECT price FROM fruitsforsale WHERE fruit='Orange'

 

figure 6
Figure 6: Indexed Lookup For The Price Of Oranges

 

In this case, SQLite still does a single binary search to find the first entry of the index where fruit='Orange'. Then it extracts the rowid from the index and uses that rowid to lookup the original table entry via binary search and output the price from the original table. But instead of quitting, the database engine then advances to the next row of index to repeat the process for next fruit='Orange' entry. Advancing to the next row of an index (or table) is much less costly than doing a binary search since the next row is often located on the same database page as the current row. In fact, the cost of advancing to the next row is so cheap in comparison to a binary search that we usually ignore it. So our estimate for the total cost of this query is 3 binary searches. If the number of rows of output is K and the number of rows in the table is N, then in general the cost of doing the query is proportional to (K+1)*logN.

1.5. Multiple AND-Connected WHERE-Clause Terms

Next, suppose that you want to look up the price of not just any orange, but specifically California-grown oranges. The appropriate query would be as follows:

SELECT price FROM fruitsforsale WHERE fruit='Orange' AND state='CA'

 

figure 7
Figure 7: Indexed Lookup Of California Oranges

 

One approach to this query is to use the fruit='Orange' term of the WHERE clause to find all rows dealing with oranges, then filter those rows by rejecting any that are from states other than California. This process is shown by figure 7 above. This is a perfectly reasonable approach in most cases. Yes, the database engine did have to do an extra binary search for the Florida orange row that was later rejected, so it was not as efficient as we might hope, though for many applications it is efficient enough.

Suppose that in addition to the index on "fruit" there was also an index on "state".

CREATE INDEX Idx2 ON fruitsforsale(state);

 

figure 8
Figure 8: Index On The State Column

 

The "state" index works just like the "fruit" index in that it is a new table with an extra column in front of the rowid and sorted by that extra column as the primary key. The only difference is that in Idx2, the first column is "state" instead of "fruit" as it is with Idx1. In our example data set, there is more redundancy in the "state" column and so they are more duplicate entries. The ties are still resolved using the rowid.

Using the new Idx2 index on "state", SQLite has another option for lookup up the price of California oranges: it can look up every row that contains fruit from California and filter out those rows that are not oranges.

 

figure 9
Figure 9: Indexed Lookup Of California Oranges

 

Using Idx2 instead of Idx1 causes SQLite to examine a different set of rows, but it gets the same answer in the end (which is very important - remember that indices should never change the answer, only help SQLite to get to the answer more quickly) and it does the same amount of work. So the Idx2 index did not help performance in this case.

The last two queries take the same amount of time, in our example. So which index, Idx1 or Idx2, will SQLite choose? If theANALYZE command has been run on the database, so that SQLite has had an opportunity to gather statistics about the available indices, then SQLite will know that the Idx1 index usually narrows the search down to a single item (our example of fruit='Orange' is the exception to this rule) whereas the Idx2 index will normally only narrow the search down to two rows. So, if all else is equal, SQLite will choose Idx1 with the hope of narrowing the search to as small a number of rows as possible. This choice is only possible because of the statistics provided by ANALYZE. If ANALYZE has not been run then the choice of which index to use is arbitrary.

1.6. Multi-Column Indices

To get the maximum performance out of a query with multiple AND-connected terms in the WHERE clause, you really want a multi-column index with columns for each of the AND terms. In this case we create a new index on the "fruit" and "state" columns of FruitsForSale:

CREATE INDEX Idx3 ON FruitsForSale(fruit, state);

 

figure 1
Figure 1: A Two-Column Index

 

A multi-column index follows the same pattern as a single-column index; the indexed columns are added in front of the rowid. The only difference is that now multiple columns are added. The left-most column is the primary key used for ordering the rows in the index. The second column is used to break ties in the left-most column. If there were a third column, it would be used to break ties for the first two columns. And so forth for all columns in the index. Because rowid is guaranteed to be unique, every row of the index will be unique even if all of the content columns for two rows are the same. That case does not happen in our sample data, but there is one case (fruit='Orange') where there is a tie on the first column which must be broken by the second column.

Given the new multi-column Idx3 index, it is now possible for SQLite to find the price of California oranges using only 2 binary searches:

SELECT price FROM fruitsforsale WHERE fruit='Orange' AND state='CA'

 

figure 11
Figure 11: Lookup Using A Two-Column Index

 

With the Idx3 index on both columns that are constrained by the WHERE clause, SQLite can do a single binary search against Idx3 to find the one rowid for California oranges, then do a single binary search to find the price for that item in the original table. There are no dead-ends and no wasted binary searches. This is a more efficient query.

Note that Idx3 contains all the same information as the original Idx1. And so if we have Idx3, we do not really need Idx1 any more. The "price of peaches" query can be satisfied using Idx3 by simply ignoring the "state" column of Idx3:

SELECT price FROM fruitsforsale WHERE fruit='Peach'

 

figure 12
Figure 12: Single-Column Lookup On A Multi-Column Index

 

Hence, a good rule of thumb is that your database schema should never contain two indices where one index is a prefix of the other. Drop the index with fewer columns. SQLite will still be able to do efficient lookups with the longer index.

1.7. Covering Indices

The "price of California oranges" query was made more efficient through the use of a two-column index. But SQLite can do even better with a three-column index that also includes the "price" column:

CREATE INDEX Idx4 ON FruitsForSale(fruit, state, price);

 

figure 13
Figure 13: A Covering Index

 

This new index contains all the columns of the original FruitsForSale table that are used by the query - both the search terms and the output. We call this a "covering index". Because all of the information needed is in the covering index, SQLite never needs to consult the original table in order to find the price.

SELECT price FROM fruitsforsale WHERE fruit='Orange' AND state='CA';

 

figure 14
Figure 14: Query Using A Covering Index

 

Hence, by adding extra "output" columns onto the end of an index, one can avoid having to reference the original table and thereby cut the number of binary searches for a query in half. This is a constant-factor improvement in performance (roughly a doubling of the speed). But on the other hand, it is also just a refinement; A two-fold performance increase is not nearly as dramatic as the one-million-fold increase seen when the table was first indexed. And for most queries, the difference between 1 microsecond and 2 microseconds is unlikely to be noticed.

1.8. OR-Connected Terms In The WHERE Clause

Multi-column indices only work if the constraint terms in the WHERE clause of the query are connected by AND. So Idx3 and Idx4 are helpful when the search is for items that are both Oranges and grown in California, but neither index would be that useful if we wanted all items that were either oranges or are grown in California.

SELECT price FROM FruitsForSale WHERE fruit='Orange' OR state='CA';

When confronted with OR-connected terms in a WHERE clause, SQLite examines each OR term separately and tries to use an index to find the rowids associated with each term. It then takes the union of the resulting rowid sets to find the end result. The following figure illustrates this process:

 

figure 15
Figure 15: Query With OR Constraints

 

The diagram above implies that SQLite computes all of the rowids first and then combines them with a union operation before starting to do rowid lookups on the original table. In reality, the rowid lookups are interspersed with rowid computations. SQLite uses one index at a time to find rowids while remembering which rowids it has seen before so as to avoid duplicates. That is just an implementation detail, though. The diagram, while not 100% accurate, provides a good overview of what is happening.

In order for the OR-by-UNION technique shown above to be useful, there must be an index available that helps resolve every OR-connected term in the WHERE clause. If even a single OR-connected term is not indexed, then a full table scan would have to be done in order to find the rowids generated by the one term, and if SQLite has to do a full table scan, it might as well do it on the original table and get all of the results in a single pass without having to mess with union operations and follow-on binary searches.

One can see how the OR-by-UNION technique could also be leveraged to use multiple indices on queries where the WHERE clause has terms connected by AND, by using an intersect operator in place of union. Many SQL database engines will do just that. But the performance gain over using just a single index is slight and so SQLite does not implement that technique at this time. However, a future version SQLite might be enhanced to support AND-by-INTERSECT.

2. Sorting

SQLite (like all other SQL database engines) can also use indices to satisfy the ORDER BY clauses in a query, in addition to expediting lookup. In other words, indices can be used to speed up sorting as well as searching.

When no appropriate indices are available, a query with an ORDER BY clause must be sorted as a separate step. Consider this query:

SELECT * FROM fruitsforsale ORDER BY fruit;

SQLite processes this by gathering all the output of query and then running that output through a sorter.

 

figure 16
Figure 16: Sorting Without An Index

 

If the number of output rows is K, then the time needed to sort is proportional to KlogK. If K is small, the sorting time is usually not a factor, but in a query such as the above where K==N, the time needed to sort can be much greater than the time needed to do a full table scan. Furthermore, the entire output is accumulated in temporary storage (which might be either in main memory or on disk, depending on various compile-time and run-time settings) which can mean that a lot of temporary storage is required to complete the query.

2.1. Sorting By Rowid

Because sorting can be expensive, SQLite works hard to convert ORDER BY clauses into no-ops. If SQLite determines that output will naturally appear in the order specified, then no sorting is done. So, for example, if you request the output in rowid order, no sorting will be done:

SELECT * FROM fruitsforsale ORDER BY rowid;

 

figure 17
Figure 17: Sorting By Rowid

 

You can also request a reverse-order sort like this:

SELECT * FROM fruitsforsale ORDER BY rowid DESC;

SQLite will still omit the sorting step. But in order for output to appear in the correct order, SQLite will do the table scan starting at the end and working toward the beginning, rather than starting at the beginning and working toward the end as shown in figure 17.

2.2. Sorting By Index

Of course, ordering the output of a query by rowid is seldom useful. Usually one wants to order the output by some other column.

If an index is available on the ORDER BY column, that index can be used for sorting. Consider the request for all items sorted by "fruit":

SELECT * FROM fruitsforsale ORDER BY fruit;

 

figure 18
Figure 18: Sorting With An Index

 

The Idx1 index is scanned from top to bottom (or from bottom to top if "ORDER BY fruit DESC" is used) in order to find the rowids for each item in order by fruit. Then for each rowid, a binary search is done to lookup and output that row. In this way, the output appears in the requested order without the need to gather the entire output and sort it using a separate step.

But does this really save time? The number of steps in the original indexless sort is proportional to NlogN since that is how much time it takes to sort N rows. But when we use Idx1 as shown here, we have to do N rowid lookups which take logN time each, so the total time of NlogN is the same!

SQLite uses a cost-based query planner. When there are two or more ways of solving the same query, SQLite tries to estimate the total amount of time needed to run the query using each plan, and then uses the plan with the lowest estimated cost. A cost is computed mostly from the estimated time, and so this case could go either way depending on the table size and what WHERE clause constraints were available, and so forth. But generally speaking, the indexed sort would probably be chosen, if for no other reason, because it does not need to accumulate the entire result set in temporary storage before sorting and thus uses much less temporary storage.

2.3. Sorting By Covering Index

If a covering index can be used for a query, then the multiple rowid lookups can be avoided and the cost of the query drops dramatically.

 

figure 19
Figure 19: Sorting With A Covering Index

 

With a covering index, SQLite can simply walk the index from one end to the other and deliver the output in time proportional to N and without having allocate a large buffer to hold the result set.

3. Searching And Sorting At The Same Time

The previous discussion has treated searching and sorting as separate topics. But in practice, it is often the case that one wants to search and sort at the same time. Fortunately, it is possible to do this using a single index.

3.1. Searching And Sorting With A Multi-Column Index

Suppose we want to find the prices of all kinds of oranges sorted in order of the state where they are grown. The query is this:

SELECT price FROM fruitforsale WHERE fruit='Orange' ORDER BY state

The query contains both a search restriction in the WHERE clause and a sort order in the ORDER BY clause. Both the search and the sort can be accomplished at the same time using the two-column index Idx3.

 

figure 20
Figure 20: Search And Sort By Multi-Column Index

 

The query does a binary search on the index to find the subset of rows that have fruit='Orange'. (Because the fruit column is the left-most column of the index and the rows of the index are in sorted order, all such rows will be adjacent.) Then it scans the matching index rows from top to bottom to get the rowids for the original table, and for each rowid does a binary search on the original table to find the price.

You will notice that there is no "sort" box anywhere in the above diagram. The ORDER BY clause of the query has become a no-op. No sorting has to be done here because the output order is by the state column and the state column also happens to be the first column after the fruit column in the index. So, if we scan entries of the index that have the same value for the fruit column from top to bottom, those index entries are guaranteed to be ordered by the state column.

3.2. Searching And Sorting With A Covering Index

A covering index can also be used to search and sort at the same time. Consider the following:

SELECT * FROM fruitforsale WHERE fruit='Orange' ORDER BY state

 

figure 21
Figure 21: Search And Sort By Covering Index

 

As before, SQLite does single binary search for the range of rows in the covering index that satisfy the WHERE clause, the scans that range from top to bottom to get the desired results. The rows that satisfy the WHERE clause are guaranteed to be adjacent since the WHERE clause is an equality constraint on the left-most column of the index. And by scanning the matching index rows from top to bottom, the output is guaranteed to be ordered by state since the state column is the very next column to the right of the fruit column. And so the resulting query is very efficient.

SQLite can pull a similar trick for a descending ORDER BY:

SELECT * FROM fruitforsale WHERE fruit='Orange' ORDER BY state DESC

The same basic algorithm is followed, except this time the matching rows of the index are scanned from bottom to top instead of from top to bottom, so that the states will appear in descending order.

3.3. Partial Sorting Using An Index (a.k.a. Block Sorting)

Sometimes only part of an ORDER BY clause can be satisfied using indexes. Consider, for example, the following query:

SELECT * FROM fruitforsale ORDER BY fruit, price

If the covering index is used for the scan, the "fruit" column will appear naturally in the correct order, but when there are two or more rows with the same fruit, the price might be out of order. When this occurs, SQLite does many small sorts, one sort for each distinct value of fruit, rather than one large sort. Figure 22 below illustrates the concept.

 

figure 22
Figure 22: Partial Sort By Index

 

In the example, instead of a single sort of 7 elements, there are 5 sorts of one-element each and 1 sort of 2 elements for the case of fruit=='Orange'.

The advantages of doing many smaller sorts instead of a single large sort are:

  1. Multiple small sorts collectively use fewer CPU cycles than a single large sort.
  2. Each small sort is run independently, meaning that much less information needs to be kept in temporary storage at any one time.
  3. Those columns of the ORDER BY that are already in the correct order due to indexes can be omitted from the sort key, further reducing storage requirements and CPU time.
  4. Output rows can be returned to the application as each small sort completes, and well before the table scan is complete.
  5. If a LIMIT clause is present, it might be possible to avoid scanning the entire table.

Because of these advantages, SQLite always tries to do a partial sort using an index even if a complete sort by index is not possible.

4. WITHOUT ROWID tables

The basic principals described above apply to both ordinary rowid tables and WITHOUT ROWID tables. The only difference is that the rowid column that serves as the key for tables and that appears as the right-most term in indexes is replaced by the PRIMARY KEY.

开源大模型Query Planning实战:Mistral-7B稳定函数调用方案 Query Planning是大语言模型从‘能说话’迈向‘会思考’的关键能力,其本质是将自然语言指令精准拆解为可执行的工具调用序列。该能力依赖模型对函数签名的理解力、JSON生成的稳定性及业务语义的映射准确性。当前闭源模型虽成熟,但受限于成本、延迟与数据合规;而主流开源模型(如Llama-2、Qwen、Phi-3)在function calling任务中普遍存在字段错、结构崩、脑补参数等工程缺陷。Mistral-7B-Instruct v0.2凭借高一致性的错误模式、强指令遵循性与量化后仅5.3GB显存占用 阅读详情

相关推荐

开源大模型驱动的查询规划:函数调用式Query Planning实战

查询规划(Query Planning)是数据库优化的核心环节,传统依赖静态规则与代价估算,难以应对动态语义和复杂业务逻辑。随着开源大语言模型(Open Source LLMs)在推理可控性、本地部署与合规性上的成熟,结合函数调用(Function Calling)机制,正催生一种新型工程范式:让LLM作为语义感知的‘智能调度中枢’,通过主动调用确定性数据库元操作(如查表结构、估连接选择率),解耦决策与执行。该路径显著提升自然语言到高效执行计划的首次生成成功率,支撑BI自动生成、慢查询治理、非技术人员安全提

weixin_34254848的博客 313

SQLite执行计划(Query Planning)---数据库索引篇

翻译自:https://www.sqlite.org/queryplanner.html 综述 SQL的最好特性就是它是一种描述性的语言,不是一种过程语言。当你用SQL编程,你是告诉系统你想计算什么,而不是怎么去计算它。如何计算的任务由SQL数据库引擎中的执行计划(Query Planner)子系统完成。 对于任意一句SQL语句,都可能有上千种算法实现它。所有这些算法都可以得到正确结果,但是

陆业聪 5889

【以规划为导向的自动驾驶】Planning-oriented Autonomous Driving

现代自动驾驶系统的特点是按顺序进行模块化任务,即感知、预测和规划。为了执行各种任务并实现高级智能,当代方法要么为单个任务部署独立模型,要么设计具有独立头部的多任务范式。但是,他们可能会遭受累积错误或任务协调不足的困扰。相反,我们认为应该设计和优化一个有利的框架,以追求最终目标,即自动驾驶汽车的规划。以此为导向,我们重新审视感知和预测中的关键组成部分,并确定任务的优先级,以便所有这些任务都有助于规划。我们推出了统一自动驾驶(UniAD),这是一个最新的综合框架,将全栈驾驶任务整合到一个网络中。

Joining667的博客 2612

Lecture #14: Query Planning & Optimization

Lecture 14 个人整理笔记。

m0_73701481的博客 1439

NL2SQL智能体系统:模式感知与多智能体协同实现自然语言数据查询

自然语言处理(NLP)技术使计算机能够理解人类语言,其核心原理是通过语义解析将非结构化文本转化为结构化表示。在数据工程领域,这一技术的价值在于降低数据访问门槛,让非技术用户也能直接查询数据库。应用场景广泛,从商业智能报表生成到自助式数据分析平台,都依赖高效准确的自然语言到SQL(NL2SQL)转换。传统的端到端模型在复杂查询中常因缺乏对数据库结构的深度理解而生成错误SQL。本文聚焦的**模式感知**和**智能体系统**正是解决这一痛点的关键技术。模式感知要求系统深入理解数据库表结构、字段类型及关联关系,如同

weixin_33178839的博客 211

基于Java+SpringBoot+Vue的中小企业设备管理系统的设计与开发(源码+lw+部署文档+讲解等)

💗博主介绍:✌新人博主,工作经验两年+、专注于Java、小程序技术领域和毕业项目实战✌💗🌟文末获取源码+数据库🌟

2301_76502068的博客 1383

Query Planning(查询方案)(搜索一)

碰到一个rowid说out of order的错误,查资料查到这里来了,这里将了sqlite是如何利用rowid来进行查询的。 简要的转述一下,也不算完全的翻译。 这篇文章主要是说明sqlite后台是如何建立索引来完成查询的,以此来让程序员能够合理的建立索引加快查询速度。 1.搜索 1.1没有索引的表 简单的讲,没有索引的表,如果要执行搜索: SELECT

chinaclock的专栏 1402

告别外置天线!手把手教你用HFSS仿真设计一个20x40mm的433MHz PCB蛇形天线

本文详细介绍了如何使用HFSS仿真工具设计一个20x40mm的433MHz PCB蛇形天线,解决物联网设备小型化中的天线集成难题。通过对比外置天线与PCB天线的性能差异,深入解析蛇形天线的电磁学原理,并提供从建模到优化的全流程实战指南,帮助工程师实现高效、低成本的微型化天线设计。

weixin_30606461的博客 431

路径规划 | 随机采样算法:PRM、RRT、RRT-Connect、RRT*

基于图搜索的路径规划算法主要用于低维度空间上的路径规划问题,它在这类问题中往往具有较好的完备性,但是需要对环境进行完整的建模工作,在高维度空间中往往会出现维数灾难。为了解决这些问题,本文将介绍基于随机采样的路径规划算法。这类算法适用于高维度空间,它们以概率完备性(当时间接近无限时一定有解)来代替完备性,从而提高搜索效率。 概率路图算法(Probabilistic Road Map, PRM) PRM算法首先使用随机采样的方式在环境中建立路径网络图,将连续的空间转换为离散的空间,然后在路径网络图上进行路径规划

白鸟无言的博客 7578

Matlab实战:用DQN算法让机器人学会自主避障(附完整代码)

本文详细介绍了如何使用Matlab实现DQN(深度Q网络)算法,使机器人在复杂环境中学会自主避障。通过环境建模、网络架构设计、奖励函数优化及实战调试,提供了完整的代码实现和训练策略,帮助开发者快速应用于机器人路径规划项目。

t8u9v0w1x的博客 232

Pikachu靶场环境搭建(Windows环境下安装详细教程)

Pikachu靶场是一个漏洞测试练习平台。其中包含了常见的web安全漏洞,如果你是一个渗透测试学习者没有靶场的练手,那么pikachu是一个很好的测试平台。

weixin_42857656的博客 1823

19.7. Query Planning

19.7执行计划 19.7.1计划器方法配置 这些配置参数提供影响查询优化器选择执行计划的方法。如果查询的执行计划不是最优,那么可临时使用以下参数强制使用不同的执行计划。不过,可通过以下方式优化执行计划选择: 调整执行计划器成本常数(参见第19.7.2节); 手动执行ANALYZE; 调大default_statistics_target配置参数值; 使用ALTER TABLE SET STATISTICS命令调大对特定列的统计信息收集; enable_bit..

在路上 463

WPF进阶 | 深入 WPF 依赖项属性:理解其强大功能与应用场景

WPF进阶 | 深入 WPF 依赖项属性:理解其强大功能与应用场景,在 Windows Presentation Foundation(WPF)开发中,依赖项属性是一个核心且强大的特性,它为构建灵活、可扩展的用户界面提供了关键支持。理解并熟练运用依赖项属性,对于开发高效、健壮的 WPF 应用程序至关重要。本文将深入探讨 WPF 依赖项属性,通过丰富的代码示例和对关键概念的详细解释,帮助读者全面掌握这一重要特性及其应用场景。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 4万+

planning ADSO/aggregation level的计划功能

Planning ADSO

weixin_45689053的博客 408

深度解析:Android开发工程师(嵌入式系统方向)职位 - 技术需求、面试准备与发展路径

本文深入分析了嵌入式Android开发工程师的岗位要求和技术内涵。该职位需要掌握C/C++、Linux系统编程、硬件接口等核心技术,能够进行Android系统底层定制开发,包括HAL层实现、Framework修改、性能优化等工作。文章详细解读了岗位职责,梳理了必备技术栈,提供了针对性的面试问题与参考答案,并探讨了职业发展路径。这类岗位要求开发者兼具软件工程能力和硬件基础知识,适合在智能电视、机顶盒、车载系统等嵌入式领域发展的技术人员。

郑伟强dev的专栏 134

点云从入门到精通技术详解100篇-基于三维点云的机器人抓取位姿检测(续)

集到的深度信息会存在噪点,因此需要将生成的场景点云进行预处理,获得平滑、降采样处理场景点云,本文设计的预处理操作更能从冗杂的场景点云中提取清晰、平滑的目标点云,便于后续的抓取位姿采样,提高后续算法的处理效率。因此需要对场景点云进行适当的分割,仅保留目标物体的点云,整个过程可以通过。场较小时,空间中的点云密度会更加提高;觉子系统的效率,再保持全局点云几何形状不改变的前提下,通过对目标点云进行。体素降采样可以快速地减少点云数据并同时保持点云的形。个点,由于我们实施抓取的目标物体只占整个场景点云图的一部分,

getusushu的博客 774

【CMU15-445 Part-14】Query Planning & Optimization I

QUERY OPTIMIZATION

https://github.com/ZhaoyungZhang 241

YOLOv8首发优化:遥感目标检测 | 专为低质量遥感图像设计的边缘 - 高斯聚合(EGA)模块,解决低空间分辨率、传感器噪声、目标模糊、低光照退化和部分遮挡等限制

一种轻量级网络,其创新性地整合了专为低质量遥感图像设计的边缘 - 高斯聚合(EGA)模块。

①答疑群聊服务;②YOLO大模型知识问答系统;③计算机视觉论文生成智能体; 492

pgsql9.1的18.7 Query Planning

Planner Method Configuration 18.7.1. Planner Method Configuration These configuration parameters provide a crude method of influencing the query plans chosen by the query optimizer. If the default pl...

fgh123的博客 484

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

【CMU15-445 Part-15】Query Planning & Optimization II

维护每张表中的基本主要信息也就是tuple数量NR​以及每个属性中不同值的数量VARNR​关系R中的元组数量,单独维护,不能用page * 每个page中的tuple数,因为mvcc 或者 填不满tuple。selection cardinality (SC(A,R)) 选择基数,tuple数量除以属性A下 去重之后值的数量来计算出。假设数据均匀分布,data uniformity。

https://github.com/ZhaoyungZhang 298

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

PlanRAG:When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Probl

PlanRAG:When RAG Meets Query Planning: Logical Query Trees for Resolving Exploratory Reasoning Problems——当RAG遇见查询规划:用于解决探索性推理问题的逻辑查询树

Together_CZ的博客 650

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

【第四周】论文精读:SmartChunk: Query-Aware Chunk Compression with Planning for Efficient Document RAG

摘要:SmartChunk - 动态分块检索框架提升RAG效率 密歇根大学与Adobe Research团队提出SmartChunk框架,解决了传统RAG系统中静态分块导致的噪声和上下文丢失问题。该框架包含两个核心组件:查询感知的规划器预测最优切片粒度范围,轻量级压缩编码器直接生成高层级语义嵌入,避免了昂贵的重复摘要生成。通过STITCH训练算法结合强化学习和模仿学习,系统实现了稳定的多目标优化。实验表明,SmartChunk在五个基准测试中准确率提升1.7%,同时降低30%的token成本,在"

sweet_ran的博客 382

实战|腾讯元宝搜索:大模型时代,搜索如何迎来新生?

摘要:随着大模型技术的快速发展,搜索领域正经历从信息检索到智能问题解决的变革。腾讯云元宝AI搜索团队探讨了大模型时代搜索技术的演进,包括检索增强生成(RAG)和多智能体协同架构的应用。文章分析了关键技术挑战,如Query Planning、Function Calling和LLM排序,并介绍了AI搜索在高考志愿填报等复杂场景中的实践案例。未来搜索将聚焦任务规划、推理能力和多模态检索增强,推动AI生态发展。腾讯推出的"联网搜索API"已服务多个行业,助力企业AI战略升级。

2401_85343303的博客 1441

规划中感知:端到端自动驾驶的耦合感知与规划

在自动驾驶系统中,‘感知’与‘规划’长期被视作独立模块,但实际落地中频繁遭遇语义鸿沟、时序割裂与梯度阻断等结构性瓶颈。其本质是传统流水线架构无法支撑毫秒级动态决策闭环所需的联合优化能力。‘规划中感知’作为一种目标驱动的新型范式,通过将规划目标(如目标航向、时间窗、运动约束)编码为可学习的规划查询(Planning Query),反向引导视觉特征提取过程,实现感知焦点的主动聚焦与关键信息的保真传递。该技术显著提升无保护左转、雨雾天气、异常交通行为等长尾场景的决策鲁棒性,已在小鹏XNGP等城市NOA系统中实现车

weixin_30882895的博客 391

腾讯元宝搜索实践:大模型时代,AI 如何让搜索焕发新生

现在面向大模型,需要精准的信息片段,因此进行了 chunk 级别索引,实现语义粒度的索引,提升检索精度,搭配大模型的总结能力生成优质回答、进行多源信息校验,降低模型幻觉。在需求理解上,传统搜索主要是分词、意图、纠错,而 AI 搜索下,用户 prompt 更复杂,贴近自然语言,需要理解上下文、拆解复杂需求、转化为适合检索的 query,这依赖领域知识精调和基于检索效果的强化学习。腾讯"联网搜索 API"的推出,不仅降低了企业接入高质量搜索能力的门槛,更通过灵活的接口设计,满足不同行业的定制化需求。

QcloudCommunity的博客 2088

Presto 之 Query & Stage的几种状态

当query被submit到resourceGroupManager后,query的状态变成WAITING_FOR_RESOURCES,WAITING_FOR_RESOURCES的状态主要为等待足够的worker个数,当worker的个数足够后,状态转为DISPATCHING状态。:QUEUED状态是query的初始状态,当CN收到查询的时候,会首先将该查询的状态置为QUEUED状态,QUEUED的查询会等待resource-group有可运行资源后进入到WAITING_FOR_RESOURCES阶段。

王飞活的博客 1584
上一篇: Raw flash vs. FTL devices, ubi
下一篇: Architecture of SQLite
wdsfup
博客等级 码龄20年 31粉丝 13原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值