Search code examples
sqlpostgresqlsequentialscanning

Is sequential disk read actually sequential?


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?


Solution

  • "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.