Re: [PERFORM] Hi

2017-08-25 Thread David G. Johnston
On Thu, Aug 24, 2017 at 11:49 PM, Daulat Ram  wrote:

> Hello,
>
>
>
> Would I request to help me on this query.
>
>
>
> SELECT 'Inspection Completed' as "ALL Status" ,COUNT(*) as "Number of
> Count" FROM ud_document WHERE status = 'Inspection Completed' union SELECT
> 'Pending', COUNT(*) FROM ud_document WHERE status = 'Pending' union SELECT
> 'Approved', COUNT(*) FROM ud_document WHERE status = 'Approved' union
> SELECT 'Rejected', COUNT(*) FROM ud_document WHERE status = 'Rejected'
> union SELECT 'Payment Due',count(*) from ud_document where payment_status =
> 'Payment Due' union SELECT 'Payment Done' ,count(*) from ud_document where
> payment_status = 'Payment Done'
>
>
>
> And now I want to exclude the uniqueid= '201708141701018' from the above
> query. how it can be ???
>
>
>
​Your use of UNION here seems necessary.  Just write a normal GROUP BY
aggregation query.  You might need to get a bit creative since you are
collapsing status and payment_status into a single column.  "CASE ... WHEN
... THEN ... ELSE ... END" is quite helpful for doing stuff like that.  For
now I'll just leave them as two columns.

​SELECT status, payment_status, count(*)
FROM ud_document
WHERE uniqueid <> '201708141701018'
GROUP BY 1, 2;

David J.


Re: [PERFORM] Hi

2017-08-24 Thread Daulat Ram
Hello,

Would I request to help me on this query.

SELECT 'Inspection Completed' as "ALL Status" ,COUNT(*) as "Number of Count" 
FROM ud_document WHERE status = 'Inspection Completed' union SELECT 'Pending', 
COUNT(*) FROM ud_document WHERE status = 'Pending' union SELECT 'Approved', 
COUNT(*) FROM ud_document WHERE status = 'Approved' union SELECT 'Rejected', 
COUNT(*) FROM ud_document WHERE status = 'Rejected' union SELECT 'Payment 
Due',count(*) from ud_document where payment_status = 'Payment Due' union 
SELECT 'Payment Done' ,count(*) from ud_document where payment_status = 
'Payment Done'

And now I want to exclude the uniqueid= '201708141701018' from the above query. 
how it can be ???


Regards,
Daulat



DISCLAIMER:

This email message is for the sole use of the intended recipient(s) and may 
contain confidential and privileged information. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply email and destroy all copies of 
the original message. Check all attachments for viruses before opening them. 
All views or opinions presented in this e-mail are those of the author and may 
not reflect the opinion of Cyient or those of our affiliates.


Re: [PERFORM] Hi

2017-04-13 Thread Glyn Astill

> From: Daulat Ram 
> To: "pgsql-performance@postgresql.org"  
> Sent: Thursday, 13 April 2017, 7:25
> Subject: [PERFORM] Hi 
>
> Hello, 
>  
> I need to know the criteria behind for settings the work_mem in PostgreSQL, 
> please give the example also if possible.
> 
> Regards,

> Daulat

Is there anything in particular from the manual pages you don't understand? It 
should be quite clear:

https://www.postgresql.org/docs/current/static/runtime-config-resource.html

"Specifies the amount of memory to be used by internal sort operations and hash 
tables before writing to temporary disk files. The value defaults to four 
megabytes (4MB). Note that for a complex query, several sort or hash operations 
might be running in parallel; each operation will be allowed to use as much 
memory as this value specifies before it starts to write data into temporary 
files."

"Also, several running sessions could be doing such operations concurrently. 
Therefore, the total memory used could be many times the value of work_mem; it 
is necessary to keep this fact in mind when choosing the value. Sort operations 
are used for ORDER BY, DISTINCT, and merge joins. Hash tables are used in hash 
joins, hash-based aggregation, and hash-based processing of IN subqueries."

Glyn


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[PERFORM] Hi

2017-04-12 Thread Daulat Ram
Hello,

I need to know the criteria behind for settings the work_mem in PostgreSQL, 
please give the example also if possible.

Regards,
Daulat


Re: [PERFORM] Hi- Sleeptime reduction

2010-11-28 Thread Kevin Grittner
aaliya zarrin  wrote:
 
> I am new to Postgres. I just wanted to know how to change the sleep
> time.
> 
> I want to reduce the sleep time, How much will it affect other
> performance issues if sleep time is reduced.
 
I don't know what sleep time you mean.  It would probably be best if
you started from a description of some specific problem rather than a
hypothetical solution.
 
For general advice on tuning, you could start here:
 
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
 
For ideas on how to submit a request for help with a performance
problem, you might want to review this:
 
http://wiki.postgresql.org/wiki/SlowQueryQuestions
 
-Kevin

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[PERFORM] Hi- Sleeptime reduction

2010-11-28 Thread aaliya zarrin
Hi all,

I am new to Postgres. I just wanted to know how to change the sleep time.

I want to reduce the sleep time, How much will it affect other performance
issues if sleep time is reduced.

Plz help. I apologize if I am sending mail to wrong contact. Kindly suggest
the correct contact details if you know.


-- 


-- 
Thanks & Regards,

Aaliya Zarrin
(+91)-9160665888


Re: [PERFORM] Hi!

2004-06-22 Thread Josh Berkus
Janio,

> I am trying install the postgresql-7.4.3 simple installation. I did
> ./configure command at the postgresql directory source. While the
> configuring proccess I receiving the follow message:

This is the wrong list for this question.  Please try PGSQL-ADMIN.  You're 
much more likely to get help there.

Sorry!

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[PERFORM] Hi!

2004-06-20 Thread Janio Rosa da Silva



Hi,
 
I am trying install the postgresql-7.4.3 simple 
installation. I did ./configure command at the postgresql directory source. 
While the configuring proccess I receiving the follow message:
 
checking for tar... /bin/tarchecking for 
strip... stripchecking whether it is possible to strip libraries... 
yeschecking for bison... bison -y*** The installed version of Bison is 
too old.  PostgreSQL needs*** Bison version 1.875 or later.checking 
for perl... /usr/bin/perlchecking for main in -lbsd... nochecking for 
setproctitle in -lutil... nochecking for main in -lm... yes
 
But, after this message the install proccess 
continue like this message. The problem is that the installation never finish. I 
am thinking that the configure proccess is in loop. Have it anything relation 
with my hardware configuration? The computer where I did this is:  AMD 
K6-II 200 MHZ; 64 MB memory;I would like why the configure proccess never 
finish.
 
Regards,
 
Janio