pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tank.zhang <6220104@qq.com>
To: pgsql-performance@postgresql.org
Subject: Re: Postgresql Sort cost Poor performance?
Date: Mon, 1 Apr 2019 03:30:09 -0700 (MST)
Message-ID: <1554114609808-0.post@n3.nabble.com> (raw)
In-Reply-To: <87d0m6uj5u.fsf@news-spur.riddles.org.uk>
References: <1554111914781-0.post@n3.nabble.com>
	<87d0m6uj5u.fsf@news-spur.riddles.org.uk>

Thank you for your reply. 

qis3_dp2=>  SHOW lc_collate;
 lc_collate  
-------------
 en_US.UTF-8
(1 row)

Time: 0.311 ms
qis3_dp2=> 

qis3_dp2=> SELECT COUNT(DISTINCT SVIN) AS CHECKCARNUM ,SMTOC FROM
QIS_CARPASSEDSTATION A WHERE 1=1 AND A.SSTATIONCD = 'VQ3_LYG' AND
A.SLINYYY-MM-DD') AND A.DWORKDATE <= TO_DATE('2019-03-11','YYYY-MM-DD')
group by  SMTOC
;
 checkcarnum |         smtoc         
-------------+-----------------------
          90 | HT6LHD700 NH731P    A
         690 | HT6LHD700 NH788P    A
          90 | HT6LHD700 R550P     A
          30 | HT6LHD700 YR615M    A
        1141 | HT6MHB700 NH731P    A



Is there any possibility of optimization?





--
Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html





view thread (9+ messages)  latest in thread

Message-ID: <1554114609808-0.post@n3.nabble.com>
Permalink:  ../1554114609808-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1554114609808-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: 6220104@qq.com
  Subject: Re: Postgresql Sort cost Poor performance?
  In-Reply-To: <1554114609808-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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