-1

Let's take some rdbms like Postgresql or Mysql. And create some table with primary key and primary index on it. Primary index is intended to speed up select operations with clause where primary_key_column=..... It relies on sorted order by primary_key_column.

What I want to clarify is, do the rdbms keep the order of entries sorted? If not, how can we perform fast select on unordered data?

voipp
  • 1,243
  • 3
  • 18
  • 31
  • http://use-the-index-luke.com/ - there is a substantial (technical) difference between the PK index in Postgres and the one in MySQL –  Jul 01 '19 at 10:13
  • Possible duplicate of [How does database indexing work? \[closed\]](https://stackoverflow.com/questions/1108/how-does-database-indexing-work) – philipxy Jul 01 '19 at 10:50
  • Depends on the DBMS, the DDL, etc etc. This question is too broad. Also, nevertheless, when this is clear it will be a faq. Before considering posting please always google any error message & many clear, concise & precise phrasings of your question/problem/goal, with & without your particular strings/names; read many answers. Also what has your research shown? Including from reading the manual of a DBMS & relevant chapters of zillions of textbooks. See [ask], other [help] links & the voting arrow mouseover texts. – philipxy Jul 01 '19 at 10:53

1 Answers1

0

Index is created on primary key column and it's structured usually as B+ tree or hashtable. The structure points on table's entries.

voipp
  • 1,243
  • 3
  • 18
  • 31