From: | Toni Alfirević <toni(dot)alfirevic(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)lists(dot)postgresql(dot)org |
Subject: | Drop in insert performance after 20ish seconds |
Date: | 2020-02-25 09:49:57 |
Message-ID: | CAKHBNE37Q4QnsMPPSt3K9vus9bDEYj9775xC7JP_0UqUkqpZ4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I'm trying to gauge how PostgreSQL would perform on a specific VPS and for
that purpose I've written a very simple console app that
continuously inserts entries into one table.
CREATE TABLE public.pg_test_messages
(
"Id" bigint NOT NULL DEFAULT
nextval('"pg_test_messages_Id_seq"'::regclass),
"Message" text COLLATE pg_catalog."default" NOT NULL,
"TimeStamp" timestamp without time zone,
CONSTRAINT "PK_pg_test_messages" PRIMARY KEY ("Id")
)
TABLESPACE pg_default;
-- Index: IX_pg_test_messages_Id
-- DROP INDEX public."IX_pg_test_messages_Id";
CREATE INDEX "IX_pg_test_messages_Id"
ON public.pg_test_messages USING btree
("Id" ASC NULLS LAST)
TABLESPACE pg_default;
And the behaviour I'm experiencing is as follows:
first 20ish seconds of inserts it takes avg. 650-700 ms to insert 1000
entries.
And after that insert performance drops to around 980-1000 ms to insert
1000 entries.
I've run numerous tests and this behaviour is consistent.
Since I'm not very familiar with all of the pgsql internal processes that
are running my question is...
Is this something that is normal and expected?
If it is, could you let me know what is this related to?
--
Toni Alfirevic
From | Date | Subject | |
---|---|---|---|
Next Message | Michael J. Cosentino | 2020-02-25 12:32:26 | Re: Unable to Connect to Server Error Help |
Previous Message | Laurenz Albe | 2020-02-25 09:44:35 | Re: Unable to Connect to Server Error Help |