1.36. SQLite Indexed By

发布时间 :2025-10-25 12:31:15 UTC      

The “INDEXED BY index-name” clause states that a named index is required to find the values in the previous table.

If the index name index-name does not exist or cannot be used for the query, then the preparation of the SQLite statement fails.

The “NOT INDEXED” clause states that indexes are not used when accessing previous tables, including implicit indexes created by UNIQUE and PRIMARY KEY constraints.

However, even if “NOT INDEXED” is specified, INTEGER PRIMARY KEY can still be used to find entries.

1.36.1. Grammar

The following is INDEXED BY The syntax of the clause, which can be associated with DELETE UPDATE Or SELECT Statement to use together:

SELECT|DELETE|UPDATE column1, column2...
INDEXED BY (index_name)
table_name
WHERE (CONDITION);

1.36.2. Example

Suppose there is a table. COMPANY We will create an index and use it to INDEXED BY Operation.

sqlite> CREATE INDEX salary_index ON COMPANY(salary);
sqlite>

Use now INDEXED BY Clause slave table COMPANY Select the data in, as follows:

sqlite> SELECT * FROM COMPANY INDEXED BY salary_index WHERE salary > 5000;
Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.