顺序磁盘读取实际上是顺序的吗? [英] Is sequential disk read actually sequential?

查看:118
本文介绍了顺序磁盘读取实际上是顺序的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PostgreSQL 9.4。

I'm using PostgreSQL 9.4.

首先,我在只有一个 ssd 驱动器的系统上安装了postgreSQL。

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

我试图了解什么是顺序读取并最终出现问题。例如,如果我们要求SQL Server提供一些未索引的数据,则可能会发生seq-scan。但是,如果两个不同的客户端同时从两个不同的表中请求数据怎么办?在这种情况下,sql-server为每个客户端创建两个不同的进程,并同时执行查询。

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?

推荐答案

顺序扫描意味着从头到尾读取了一个表,依次逐行。

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

这篇关于顺序磁盘读取实际上是顺序的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆