Thread: PostgreSQL and local HDD
Hello, Why is the PostgreSQL database slow when it is on the server's hard drive? My servers are HPE ProLiant DL380p G8 and HPEProLiant DL380 G9. Does the database have to be on a storage like EMC or QNAP? Does PostgreSQL have an option to increase speed? Thank you.
Hi Jason
On Tue, Aug 15, 2023 at 9:23 AM Jason Long <hack3rcon@yahoo.com> wrote:
Hello,
Why is the PostgreSQL database slow when it is on the server's hard drive? My servers are HPE ProLiant DL380p G8 and HPE ProLiant DL380 G9.
Can you be more specific in your question? Reasons for the server would be "slow" can be many and can be addressed in many ways. So additional information would be welcome:
- Size of the database
- Number of rows (and their number of columns, size...) in the tables
- Indices and other optimization tricks
- The query itself
- ... and other server configuration parameters
Does the database have to be on a storage like EMC or QNAP?
Faster storage can only help but I would start by discarding functional overhead.
Does PostgreSQL have an option to increase speed?
It is usually achieved by reducing the number of rows you pull from the disk.
Try the command EXPLAIN ( https://www.postgresql.org/docs/current/sql-explain.html ) to see where the server is wasting time.
Thank you.
--
Olivier Gautherot
On 8/15/23 04:24, Olivier Gautherot wrote:
[snip]
Functional overhead?
--
[snip]
Does the database have to be on a storage like EMC or QNAP?Faster storage can only help but I would start by discarding functional overhead.
Functional overhead?
--
Born in Arizona, moved to Babylonia.
On 8/15/23 02:23, Jason Long wrote: [snip] > Does PostgreSQL have an option to increase speed? Like a Turbo button? -- Born in Arizona, moved to Babylonia.
El mié, 16 ago 2023 5:39, Ron <ronljohnsonjr@gmail.com> escribió:
On 8/15/23 04:24, Olivier Gautherot wrote:
[snip]Does the database have to be on a storage like EMC or QNAP?Faster storage can only help but I would start by discarding functional overhead.
Functional overhead?
I mean inefficient design, which won't be solved by changing the storage.
--
Olivier Gautherot
On 8/15/23 23:48, Olivier Gautherot wrote:
Ah, the normal aspects of physical design...
--
El mié, 16 ago 2023 5:39, Ron <ronljohnsonjr@gmail.com> escribió:On 8/15/23 04:24, Olivier Gautherot wrote:
[snip]Does the database have to be on a storage like EMC or QNAP?Faster storage can only help but I would start by discarding functional overhead.
Functional overhead?I mean inefficient design, which won't be solved by changing the storage.
Ah, the normal aspects of physical design...
--
Born in Arizona, moved to Babylonia.
El mié, 16 ago 2023 6:54, Ron <ronljohnsonjr@gmail.com> escribió:
On 8/15/23 23:48, Olivier Gautherot wrote:El mié, 16 ago 2023 5:39, Ron <ronljohnsonjr@gmail.com> escribió:On 8/15/23 04:24, Olivier Gautherot wrote:
[snip]Does the database have to be on a storage like EMC or QNAP?Faster storage can only help but I would start by discarding functional overhead.
Functional overhead?I mean inefficient design, which won't be solved by changing the storage.
Ah, the normal aspects of physical design...
... and considerung that the OP did not quantify what "slow" means and what his reference/expectation is.
Let's wait for the OP to give more background.
På onsdag 16. august 2023 kl. 05:40:40, skrev Ron <ronljohnsonjr@gmail.com>:
On 8/15/23 02:23, Jason Long wrote:
[snip]
> Does PostgreSQL have an option to increase speed?
Like a Turbo button?
It actually has that, but you'll have to sacrifice some safety.
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
Attachment
On 8/16/23 03:40, Andreas Joseph Krogh wrote:
lol... we never push that turbo button.
--
.ck-content { --ck-color-image-caption-background: #f7f7f7; --ck-color-image-caption-text: #333333; --ck-color-mention-background: #990030E6; --ck-color-mention-text: #990030; --ck-color-table-caption-background: #f7f7f7; --ck-color-table-caption-text: #333333; --ck-highlight-marker-blue: #72ccfd; --ck-highlight-marker-green: #62f962; --ck-highlight-marker-pink: #fc7899; --ck-highlight-marker-yellow: #fdfd77; --ck-highlight-pen-green: #128a00; --ck-highlight-pen-red: #e71313; --ck-image-style-spacing: 1.5em; --ck-spacing-large: 2px; --ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2); --ck-todo-list-checkmark-size: 16px; /* This works when email is READ in Visena-reader, because there the content of the email is in "shadow-DOM", which has it's own :root, but needs to be declared in ".ck-content p, .ck-content div" as well for the actual CKEditor to display it correctly, else it get's its default from .liftTemplate */ font-family: Arial, Helvetica, sans-serif; font-size: 14px; }.ck-content .image.image_resized { max-width: 100%; display: block; box-sizing: border-box; }.ck-content .image.image_resized img { width: 100%; }.ck-content .image.image_resized > figcaption { display: block; }.ck-content .image > figcaption { display: table-caption; caption-side: bottom; word-break: break-word; color: var(--ck-color-image-caption-text); background-color: var(--ck-color-image-caption-background); padding: .6em; font-size: .75em; outline-offset: -1px; }.ck-content p, .ck-content div { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }.ck-content p.visenaNormal { margin: 0; }.ck-content .text-tiny { font-size: .7em; }.ck-content .text-small { font-size: .85em; }.ck-content .text-big { font-size: 1.4em; }.ck-content .text-huge { font-size: 1.8em; }.ck-content .image-style-block-align-left, .ck-content .image-style-block-align-right { max-width: calc(100% - var(--ck-image-style-spacing)); }.ck-content .image-style-align-left, .ck-content .image-style-align-right { clear: none; }.ck-content .image-style-side { float: right; margin-left: var(--ck-image-style-spacing); max-width: 50%; }.ck-content .image-style-align-left { float: left; margin-right: var(--ck-image-style-spacing); }.ck-content .image-style-align-center { margin-left: auto; margin-right: auto; }.ck-content .image-style-align-right { float: right; margin-left: var(--ck-image-style-spacing); }.ck-content .image-style-block-align-right { margin-right: 0; margin-left: auto; }.ck-content .image-style-block-align-left { margin-left: 0; margin-right: auto; }.ck-content p + .image-style-align-left, .ck-content p + .image-style-align-right, .ck-content p + .image-style-side { margin-top: 0; }.ck-content .image-inline.image-style-align-left, .ck-content .image-inline.image-style-align-right { margin-top: var(--ck-inline-image-style-spacing); margin-bottom: var(--ck-inline-image-style-spacing); }.ck-content .image-inline.image-style-align-left { margin-right: var(--ck-inline-image-style-spacing); }.ck-content .image-inline.image-style-align-right { margin-left: var(--ck-inline-image-style-spacing); }.ck-content .image { display: table; clear: both; text-align: center; margin: 0 auto; min-width: 50px; }.ck-content .image img { display: block; margin: 0 auto; max-width: 100%; min-width: 100%; }.ck-content .image-inline { /* * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).; * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root. * This strange behavior does not happen with inline-flex. */ display: inline-flex; max-width: 100%; align-items: flex-start; }.ck-content .image-inline picture { display: flex; }.ck-content .image-inline picture, .ck-content .image-inline img { flex-grow: 1; flex-shrink: 1; max-width: 100%; }.ck-content .marker-yellow { background-color: var(--ck-highlight-marker-yellow); }.ck-content .marker-green { background-color: var(--ck-highlight-marker-green); }.ck-content .marker-pink { background-color: var(--ck-highlight-marker-pink); }.ck-content .marker-blue { background-color: var(--ck-highlight-marker-blue); }.ck-content .pen-red { color: var(--ck-highlight-pen-red); background-color: transparent; }.ck-content .pen-green { color: var(--ck-highlight-pen-green); background-color: transparent; }.ck-content hr { margin: 15px 0; height: 4px; background: #dedede; border: 0; }.ck-content blockquote { overflow: hidden; padding-right: 0; padding-left: 1ex; margin-left: 0; margin-right: 0; font-style: unset; border-left: solid 1px #cccccc; }.ck-content .blockquote { font-style: unset; }.ck-content[dir="rtl"] blockquote { border-left: 0; border-right: solid 1px #cccccc; }.ck-content code { background-color: #c7c7c7; padding: 0 1px; font-size: small; border-radius: 2px; }.ck-content .table > figcaption { display: table-caption; caption-side: top; word-break: break-word; text-align: center; color: var(--ck-color-table-caption-text); background-color: var(--ck-color-table-caption-background); padding: .6em; font-size: .75em; outline-offset: -1px; }.ck-content .table { margin: 0 auto; display: table; }.ck-content .table table { border-collapse: collapse; border-spacing: 0; width: 100%; height: 100%; border: 1px double #b3b3b3; }.ck-content .table table td, .ck-content .table table th { min-width: 2em; padding: .4em; border: 1px solid #bfbfbf; }.ck-content .table table th { font-weight: bold; background: #000000E6; }.ck-content[dir="rtl"] .table th { text-align: right; }.ck-content[dir="ltr"] .table th { text-align: left; }.ck-content .table { margin-left: 0; }.ck-content .table table { }.ck-content .table table td { }.ck-content .page-break { position: relative; clear: both; padding: 5px 0; display: flex; align-items: center; justify-content: center; }.ck-content .page-break::after { content: ''; position: absolute; border-bottom: 2px dashed #c4c4c4; width: 100%; }.ck-content .page-break__label { position: relative; z-index: 1; padding: .3em .6em; display: block; text-transform: uppercase; border: 1px solid #c4c4c4; border-radius: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 0.75em; font-weight: bold; color: #333333; background: #ffffff; box-shadow: 2px 2px 1px #000000; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }.ck-content .media { clear: both; margin: 0 0; display: block; min-width: 15em; }.ck-content .todo-list { list-style: none; }.ck-content .todo-list li { margin-bottom: 5px; }.ck-content .todo-list li .todo-list { margin-top: 5px; }.ck-content .todo-list .todo-list__label > input { -webkit-appearance: none; display: inline-block; position: relative; width: var(--ck-todo-list-checkmark-size); height: var(--ck-todo-list-checkmark-size); vertical-align: middle; border: 0; left: -25px; margin-right: -15px; right: 0; margin-left: 0; }.ck-content .todo-list .todo-list__label > input::before { display: block; position: absolute; box-sizing: border-box; content: ''; width: 100%; height: 100%; border: 1px solid #333333; border-radius: 2px; transition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border; }.ck-content .todo-list .todo-list__label > input::after { display: block; position: absolute; box-sizing: content-box; pointer-events: none; content: ''; left: calc( var(--ck-todo-list-checkmark-size) / 3 ); top: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); width: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); height: calc( var(--ck-todo-list-checkmark-size) / 2.6 ); border-style: solid; border-color: transparent; border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0; transform: rotate(45deg); }.ck-content .todo-list .todo-list__label > input[checked]::before { background: #26ab33; border-color: #26ab33; }.ck-content .todo-list .todo-list__label > input[checked]::after { border-color: #ffffff; }.ck-content .todo-list .todo-list__label .todo-list__label__description { vertical-align: middle; }.ck-content span[lang] { font-style: italic; }.ck-content pre { padding: 1em; color: #353535; background: #c7c7c7; border: 1px solid #c4c4c4; border-radius: 2px; text-align: left; direction: ltr; tab-size: 4; white-space: pre-wrap; font-style: normal; min-width: 200px; }.ck-content pre code { background: unset; padding: 0; border-radius: 0; }.ck-content .mention { background: var(--ck-color-mention-background); color: var(--ck-color-mention-text); } På onsdag 16. august 2023 kl. 05:40:40, skrev Ron <ronljohnsonjr@gmail.com>:On 8/15/23 02:23, Jason Long wrote:
[snip]
> Does PostgreSQL have an option to increase speed?
Like a Turbo button?It actually has that, but you'll have to sacrifice some safety.
lol... we never push that turbo button.
--
Born in Arizona, moved to Babylonia.