Is sequential disk read actually sequential?

感情迁移 提交于 2019-12-02 09:42:44

问题


I'm using PostgreSQL 9.4.

First, I have postgreSQL installed on a system with the only one ssd-drive.

I'm trying to understand what sequential read is and end up with some issue. For instance, if we ask for an SQL-Server to give us some unindexed data, the seq-scan is likely to be happen. But What if two different clients ask for data from two different tables simultaneously? In this case, sql-server creates two different processes for each client and executes the queries concurrently.

But if the queries are being executed concurrently, the head of the drive need to jump from the area the first table is stored to the area the second is.

So, we actually have no sequntial read, jumping between the tables' areas. Where am I worng? Couldn't you explain those things a bit?


回答1:


"sequential scan" means a table was read from the beginning to the end, sequentially row by row. It means nothing in terms of how data is read from physical storage.

So the term is about logical reads.

Not sure if the answer needs more explanation.



来源:https://stackoverflow.com/questions/32496981/is-sequential-disk-read-actually-sequential

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!