pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Fwd: postgresql performance question
3+ messages / 3 participants
[nested] [flat]

* Fwd: postgresql performance question
@ 2018-02-11 15:15 許耀彰 <kpm906@gmail.com>
  2018-02-11 16:14 ` Re: Fwd: postgresql performance question Pavan Teja <pavan.postgresdba@gmail.com>
  2018-02-12 17:55 ` Re: Fwd: postgresql performance question Tomas Vondra <tomas.vondra@2ndquadrant.com>
  0 siblings, 2 replies; 3+ messages in thread

From: 許耀彰 @ 2018-02-11 15:15 UTC (permalink / raw)
  To: pgsql-bugs

Dear Support Team,
I create a table by command as listed as below:
*CREATE TABLE public.log2*
*(*
*        d3 text COLLATE pg_catalog."default"*
*)*
*WITH (*

*    OIDS = FALSE*

*)*

*TABLESPACE pg_default;*

And then use command as listed as below to import data to log2 table

*COPY log2 FROM '/home/anderson/0107.csv' CSV HEADER;*

My purpose is to import log information to log2 table to analysis, but I
found one situation : for example , I have 166856 records in log2 table,
when I use select command to list data , it spent a lot time, can we adjust
the situation ?
*select * from log2 *
Thanks for your kindly assistance.
Additional information: The attachment is log format
Best Regards, Anderson Hsu

Attachments:

  0101.csv (text/csv, 4.6M) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Fwd: postgresql performance question
  2018-02-11 15:15 Fwd: postgresql performance question 許耀彰 <kpm906@gmail.com>
@ 2018-02-11 16:14 ` Pavan Teja <pavan.postgresdba@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Pavan Teja @ 2018-02-11 16:14 UTC (permalink / raw)
  To: 許耀彰 <kpm906@gmail.com>; +Cc: pgsql-bugs

Hi,

You can filter by using error_severity condition in the where Clause like:
Select * from log2 where error_severity ='error';


Regards,
Pavan

On Feb 11, 2018 9:31 PM, "許耀彰" <kpm906@gmail.com> wrote:

> Dear Support Team,
> I create a table by command as listed as below:
> *CREATE TABLE public.log2*
> *(*
> *        d3 text COLLATE pg_catalog."default"*
> *)*
> *WITH (*
>
> *    OIDS = FALSE*
>
> *)*
>
> *TABLESPACE pg_default;*
>
> And then use command as listed as below to import data to log2 table
>
> *COPY log2 FROM '/home/anderson/0107.csv' CSV HEADER;*
>
> My purpose is to import log information to log2 table to analysis, but I
> found one situation : for example , I have 166856 records in log2 table,
> when I use select command to list data , it spent a lot time, can we adjust
> the situation ?
> *select * from log2 *
> Thanks for your kindly assistance.
> Additional information: The attachment is log format
> Best Regards, Anderson Hsu
>
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Fwd: postgresql performance question
  2018-02-11 15:15 Fwd: postgresql performance question 許耀彰 <kpm906@gmail.com>
@ 2018-02-12 17:55 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tomas Vondra @ 2018-02-12 17:55 UTC (permalink / raw)
  To: 許耀彰 <kpm906@gmail.com>; pgsql-bugs



On 02/11/2018 04:15 PM, 許耀彰 wrote:
> Dear Support Team, 
> I create a table by command as listed as below:
> *CREATE TABLE public.log2*
> *(*
> *        d3 text COLLATE pg_catalog."default"*
> *)*
> *WITH (*
> *
> *
> *    OIDS = FALSE*
> *
> *
> *)*
> *
> *
> *TABLESPACE pg_default;*
> 
> And then use command as listed as below to import data to log2 table
> 
> *COPY log2 FROM '/home/anderson/0107.csv' CSV HEADER;*
> 
> My purpose is to import log information to log2 table to analysis, but I
> found one situation : for example , I have 166856 records in log2 table,
> when I use select command to list data , it spent a lot time, can we
> adjust the situation ? 
> *select * from log2 *
> Thanks for your kindly assistance.

Sorry for being annoying, but this mailing list is for bug reports, and
your post is clearly not one. Please, send it to pgsql-performance, more
people are watching that list and you're more likely to get help.

Furthermore, I strongly recommend reading this:

    https://wiki.postgresql.org/wiki/Slow_Query_Questions

It may actually have answer to your question, and in case it does not it
lists things you need to include in your post. For example query plan or
information about the hardware/system would be very helpful.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-02-12 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 15:15 Fwd: postgresql performance question 許耀彰 <kpm906@gmail.com>
2018-02-11 16:14 ` Pavan Teja <pavan.postgresdba@gmail.com>
2018-02-12 17:55 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox