由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
CS版 - Basic Question About Indexing in Database
相关主题
Database Administrator Job opportunity关于database的学习
Database Administrator Job opportunityHow about networking 2005 in Waterloo?
DBA job opportunity谁给讲讲: query, index 和retrieval的理解
数据科学之江湖兵器谱 (转载)PageRank问题请教
[合集] Any research left for database area?牛人啊
弱问啥叫key indexingtechnical question: search query term correction in Google? (转载)
【求助】Solr Indexing怎么去indexing两个HBase Table?Automata Theory有用吗
有人做fuzzy clustering的么? (转载)【求教】Text Indexer for Large Volume of ASCII files【先谢】
相关话题的讨论汇总
话题: indexing话题: index话题: what话题: database话题: sorting
进入CS版参与讨论
1 (共1页)
s*i
发帖数: 31
1
What is the difference between "store the records in a file organized as an
index on attribute A." and "sorting the file by attribute A".
Let's say we have a table of 5 records of (age,salary).
(25,50000) (30,60000) (35, 70000) (40,80000) (50,90000)
What is the result of indexing this table on age VS sorting this table on
age? Both are techniques used by DBMS right?
Tell me what is the difference between the 2 techniques?
c*****t
发帖数: 1879
2
Index is automatically used by the query engine while explicitly
specifying sorting is done by the user who does the query.
Usually, when index is used, tuples are retrieved in the order
they appear in the index, so they are sort in a way, although
may not be in the order wanted by the user.
When user explicitly specify the query order, if there is no
such index for the column, in memory sorting is performed before
result is returned.

an

【在 s*i 的大作中提到】
: What is the difference between "store the records in a file organized as an
: index on attribute A." and "sorting the file by attribute A".
: Let's say we have a table of 5 records of (age,salary).
: (25,50000) (30,60000) (35, 70000) (40,80000) (50,90000)
: What is the result of indexing this table on age VS sorting this table on
: age? Both are techniques used by DBMS right?
: Tell me what is the difference between the 2 techniques?

s*i
发帖数: 31
3
How does database perform indexing? Does it need to create another file, and
what does it put in the 2nd file?

【在 c*****t 的大作中提到】
: Index is automatically used by the query engine while explicitly
: specifying sorting is done by the user who does the query.
: Usually, when index is used, tuples are retrieved in the order
: they appear in the index, so they are sort in a way, although
: may not be in the order wanted by the user.
: When user explicitly specify the query order, if there is no
: such index for the column, in memory sorting is performed before
: result is returned.
:
: an

c*****t
发帖数: 1879
4
It depends.
For primary clustering index, there isn't a need of a separate index
file since the records are already in that order.
PostreSQL doesn't use primary clustering index, so all indexes are
secondary.
The details of how indexes are stored are also implementation specific.
For example, there are hash, b+ tree, r-tree, gist indexing etc. Some
implementation basically treat index entries as another relational
table.
Typically, the entire value of the column(s), or the result coming
from ev

【在 s*i 的大作中提到】
: How does database perform indexing? Does it need to create another file, and
: what does it put in the 2nd file?

1 (共1页)
进入CS版参与讨论
相关主题
【求教】Text Indexer for Large Volume of ASCII files【先谢】[合集] Any research left for database area?
请教 EE phd 自学 CS弱问啥叫key indexing
C++ static member method with default arguments (转载)【求助】Solr Indexing怎么去indexing两个HBase Table?
请问怎么计算两种clustering之间的差异有人做fuzzy clustering的么? (转载)
Database Administrator Job opportunity关于database的学习
Database Administrator Job opportunityHow about networking 2005 in Waterloo?
DBA job opportunity谁给讲讲: query, index 和retrieval的理解
数据科学之江湖兵器谱 (转载)PageRank问题请教
相关话题的讨论汇总
话题: indexing话题: index话题: what话题: database话题: sorting