Re: [PERFORM] How to track number of connections and hosts to Postgres cluster

2011-08-24 Thread Adarsh Sharma
pg_stat_activity keeps track of all this information. select * from pg_stat_activity where datname='databasename'; Venkat Balaji wrote: Thanks Guillaume !! But, if put log_connections to on and log_disconnections to on wouldn't the Postgres be logging in lot of data ? Will this not be IO

Re: [PERFORM] Parameters for PostgreSQL

2011-08-03 Thread Adarsh Sharma
I think RAID 10 is best among all the RAID Levels. Thanks Craig Ringer wrote: On 04/08/11 11:42, Jayadevan M wrote: Hello, >The most important spec has been omitted. What's the storage subsystem? We have storage on SAN, RAID 5. RAID 5? That's *really* not ideal for database workloads, eit

[PERFORM] Need to tune for Heavy Write

2011-08-03 Thread Adarsh Sharma
Dear all, From the last few days, I researched a lot on Postgresql Performance Tuning due to slow speed of my server. My application selects data from mysql database about 10 rows , process it & insert into postgres 2 tables by making about 45 connections. I set my postgresql parameters i

[PERFORM] Which Join is better

2011-08-01 Thread Adarsh Sharma
Dear all, Just want to know which join is better for querying data faster. I have 2 tables A ( 70 GB ) & B ( 7 MB ) A has 10 columns & B has 3 columns.Indexes exist on both tables's ids. select p.* from table A p, B q where p.id=q.id or select p.* from table B q , A p where q.id=p.id Thank

[PERFORM] How to Speed up Insert from Multiple Connections

2011-08-01 Thread Adarsh Sharma
Dear all, I research a lot on Postgresql Performance Tuning and find some parameters to increase the select performance in postgresql. By increasing shared_buffers,effective_cache_size ,work_mem, maintainance etc , we can achieve performance in select queries. But In my application about 200

Re: [PERFORM] [ADMIN] Restore database after drop command

2011-07-25 Thread Adarsh Sharma
ough backup.sql (21GB)file May be there is chance because we work very rarely on that system. Now i have the backup file bt I want that 3-4 tables. Thanks Vibhor Kumar wrote: On Jul 25, 2011, at 12:08 PM, Adarsh Sharma wrote: I restore globedatabase from a .sql file on yesterday morning.I

[PERFORM] Restore database after drop command

2011-07-24 Thread Adarsh Sharma
in the E:/data directory & Binary log is also enabled. Please let me know if it is possible. It's urgent. Thanks & Regards Adarsh Sharma

[PERFORM] Why query takes soo much time

2011-05-15 Thread Adarsh Sharma
Dear all, I have a query on 3 tables in a database as :- _*Explain Analyze Output :-*_ explain anayze select c.clause, s.subject ,s.object , s.verb, s.subject_type , s.object_type ,s.doc_id ,s.svo_id from clause2 c, svo2 s ,page_content p where c.clause_id=s.clause_id and s.doc_id=c.source_id

Re: [PERFORM] The right SHMMAX and FILE_MAX

2011-05-02 Thread Adarsh Sharma
Tomas Vondra wrote: Dne 2.5.2011 06:53, Adarsh Sharma napsal(a): I am also in need of a proper documentation that explains how to set SHMAX and SHMALL variables in Postgres. What things need to be taken in consideration before doing that ? What is the value of SHMAX & SHMALL if u hav

Re: [PERFORM] The right SHMMAX and FILE_MAX

2011-05-01 Thread Adarsh Sharma
I am also in need of a proper documentation that explains how to set SHMAX and SHMALL variables in Postgres. What things need to be taken in consideration before doing that ? What is the value of SHMAX & SHMALL if u have 16 GB RAM for Postgres Server ? Thanks Phoenix Kiula wrote: Hi. I'm

Re: [PERFORM] Postgres Performance Tuning

2011-04-05 Thread Adarsh Sharma
Scott Marlowe wrote: On Tue, Apr 5, 2011 at 1:33 AM, Adarsh Sharma wrote: [root@s8-mysd-2 ~]# free -m total used free sharedbuffers cached Mem: 15917 15826 90 0101 15013 -/+ buffers/cache:711 15205

[PERFORM] Which is better Index

2011-04-05 Thread Adarsh Sharma
x_svo2_id_dummy1 ON svo2 USING btree (clause_id); CREATE INDEX idx_svo2_id_dummy2 ON svo2 USING btree (sentence_id); Which is better if a query uses all three columns in join where clause. Thanks & best regards, Adarsh Sharma

Re: [PERFORM] Postgres Performance Tuning

2011-04-05 Thread Adarsh Sharma
ata, it will use Swap Memory & degrades Performance. Please correct if I'm wrong. Thanks & best Regards, Adarsh Sharma Raghavendra wrote: Adarsh, [root@s8-mysd-2 8.4SS]# iostat -bash: iostat: command not found /usr/bin/iostat Our application runs

Re: [PERFORM] Postgres Performance Tuning

2011-04-04 Thread Adarsh Sharma
int_segment/// Its very less in your setting checkpoint_timeout temp_buffer // If application is using temp tables These parameter will also boost the performance. Best Regards Raghavendra EnterpriseDB Corporation. Scott Marlowe wrote: On Mon, Apr 4, 2011 at 5:3

Re: [PERFORM] Postgres Performance Tuning

2011-04-04 Thread Adarsh Sharma
8.4SS]# iostat -bash: iostat: command not found [root@s8-mysd-2 8.4SS]# Best regards, Adarsh Scott Marlowe wrote: On Mon, Apr 4, 2011 at 5:34 AM, Adarsh Sharma wrote: Mem: 16299476k total, 16198784k used, 100692k free,73776k buffers Swap: 16787884k total, 148176k used, 16639708k

Re: [PERFORM] Postgres Performance Tuning

2011-04-04 Thread Adarsh Sharma
and how much memory does 1 Connection Uses and how to use Server parameters accordingly. Thanks & best Regards, Adarsh Sharma Raghavendra wrote: Adarsh, What is the Size of Database? Best Regards, Raghavendra EnterpriseDB Corporation On Mon, Apr 4, 2011 at 4:24 PM, Scott Marlowe <mail

Re: [PERFORM] Postgres Performance Tuning

2011-04-04 Thread Adarsh Sharma
select statements and i find one reason of poor indexing on TEXT columns. Thanks & best Regards, Adarsh Sharma regards Tomas

[PERFORM] Postgres Performance Tuning

2011-04-04 Thread Adarsh Sharma
; INSERT into database tables. Please check the attached postgresql.conf . And also have some views on how to tune this server. DO I need to Increase my RAM s.t I hit H/W limitation. Thanks & best Regards, Adarsh Sharma # - # PostgreSQL config

Re: [PERFORM] Why Index is not used

2011-03-25 Thread Adarsh Sharma
Chetan Suttraway wrote: On Fri, Mar 25, 2011 at 2:25 PM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: Could you please post output of below queries: explain select c.clause, s.* from clause2 c, svo2 s where c.clause_id=s.clause_id; explain select c.cla

Re: [PERFORM] Why Index is not used

2011-03-25 Thread Adarsh Sharma
th=1993) (9 rows) Please let me know if any other information is required. -- Best Regards, Adarsh Sharma

Re: [PERFORM] Why Index is not used

2011-03-25 Thread Adarsh Sharma
Chetan Suttraway wrote: On Fri, Mar 25, 2011 at 12:05 PM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: Dear all, Today I got to run a query internally from my application by more than 10 connections. But The query performed very badly. A the data size of

Re: [PERFORM] Why Index is not used

2011-03-24 Thread Adarsh Sharma
018.665 rows=31853083 loops=1) Total runtime: 647804.037 ms (9 rows) Thanks , Adarsh Andreas Kretschmer wrote: Adarsh Sharma wrote: Dear all, Today I got to run a query internally from my application by more than 10 connections. But The query performed very badly. A the data size of t

[PERFORM] Why Index is not used

2011-03-24 Thread Adarsh Sharma
_clause ON clause2 USING btree (clause_id, source_id, sentence_id); CREATE INDEX idx_svo2 ON svo2 USING btree (clause_id, doc_id, sentence_id); I don't know why it not uses the index scan for clause2 table. Any suggestions to tune the query. Thanks & best Regards, Adarsh Sharma -

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
t...@fuzzy.cz wrote: On 03/23/2011 04:17 AM, Adarsh Sharma wrote: explain analyze select distinct(p.crawled_page_id) from page_content p where NOT EXISTS (select 1 from clause2 c where c.source_id = p.crawled_page_id); You know... I'm surprised nobody has mentioned this

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
) shared_buffers = 4GB max_connections=700 effective_cache_size = 6GB work_mem=16MB maintenance_mem=64MB I think to change work_mem=64MB maintenance_mem=256MB Does it has some effects now. Thanks & best Regards, Adarsh Sharma Best regards, Vitalii Tymchyshyn -- Regards, Chetan

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
Vitalii Tymchyshyn wrote: 23.03.11 13:21, Adarsh Sharma ???(??): Thank U all, for U'r Nice Support. Let me Conclude the results, below results are obtained after finding the needed queries : *First Option : *pdc_uima=# explain analyze select distinct(p.crawled_page_id)

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
Thanks & best Regards, Adarsh Sharma Chetan Suttraway wrote: On Wed, Mar 23, 2011 at 4:08 PM, mailto:t...@fuzzy.cz>> wrote: > I just want to retrieve that id 's from page_content which do not have > any entry in clause2 table. In that case the quer

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
Vitalii Tymchyshyn wrote: 23.03.11 12:10, Adarsh Sharma ???(??): I just want to retrieve that id 's from page_content which do not have any entry in clause2 table. Then select distinct(p.crawled_page_id) from page_content p where NOT EXISTS (select 1 from clause2 c where c.sour

Re: [PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
I just want to retrieve that id 's from page_content which do not have any entry in clause2 table. Thanks , Adarsh Vitalii Tymchyshyn wrote: 23.03.11 11:17, Adarsh Sharma ???(??): I think it is very much faster but I don't understand the query : *explain select distinct(b)

[PERFORM] Re-Reason of Slowness of Query

2011-03-23 Thread Adarsh Sharma
=10622488 width=4) Index Cond: (p.crawled_page_id < c.source_id) (11 rows) I don't think this is correct because it produce 11 rows output. Any further suggestions, Please guide. Thanks & best Regards, Adarsh Sharma

Re: [PERFORM] Reason of Slowness of query

2011-03-23 Thread Adarsh Sharma
th=4) (actual time=0.055..23408.884 rows=31853083 loops=1) Total runtime: 56687.660 ms (7 rows) But Is there is any option to tune it further and one more thing output rows varies from 6 to 7. Thanks & best Regards, Adarsh Sharma Chetan Suttraway wrote: On Wed, Mar 23, 201

[PERFORM] Reason of Slowness of query

2011-03-22 Thread Adarsh Sharma
Dear all, I have 2 tables in my database name clause2( 4900 MB) & page_content(1582 MB). My table definations are as : *page_content :- *CREATE TABLE page_content ( content_id integer, wkb_geometry geometry, link_level integer, isprocessable integer, isvalid integer, isanalyzed integer

Re: [PERFORM] Help with Query Tuning

2011-03-17 Thread Adarsh Sharma
ent like '%Militant%' OR content like '%jihad%' OR content like '%Mujahid%' OR content like '%fedayeen%' OR content like '%insurgent%' OR content like '%terrORist%' OR content like '%cadre%' OR content like '%civilians%

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Adarsh Sharma
x27; || '%Militant%' || '%fedayeen%' || '%insurgent%' || '%terrORist%' || '%cadre%' || '%civilians%' || '%police%' || '%defence%' || '%cops%' || '%crpf%' || '%dsf%' || '%ssb%'); c

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Adarsh Sharma
Thanks Marshall, would I need to change the data type of *content *column to tsvector and create a Gist Index on it. Best Regards, Adarsh Kenneth Marshall wrote: On Wed, Mar 16, 2011 at 02:43:38PM +0530, Adarsh Sharma wrote: Dear all, I am facing a problem while creating the index to

[PERFORM] Help with Query Tuning

2011-03-16 Thread Adarsh Sharma
SING btree (crawled_page_id,content_language,publishing_date,isprocessable); *Index that fail to create: *CREATE INDEX idx_page_id_content1 ON page_content USING btree (crawled_page_id,content); Error :-ERROR: index row requires 13240 bytes, maximum size is 8191 ** Error ** ERROR: index row requires 13240 bytes, maximum size is 8191 SQL state: 54000 How to resolve this error Please give any suggestion to tune the query. Thanks & best Regards, Adarsh Sharma

[PERFORM] How to tune this query

2011-03-07 Thread Adarsh Sharma
otal runtime: 696.856 ms What is the reason that first time it takes so much time and I know second time , Postgres uses cache . Is it possible to make it run faster at the first time too. Please let me know. Thanks & best Regards, Adarsh Sharma -- Sent via pgsql-performance mailing list (pg

[PERFORM] Is it require further tuning

2011-03-02 Thread Adarsh Sharma
rows=2458 width=1412) (actual time=7.964..7.964 rows=2458 loops=1) -> Seq Scan on website_master w (cost=0.00..452.58 rows=2458 width=1412) (actual time=0.009..4.495 rows=2458 loops=1) Total runtime: 64.396 ms Don't know why it uses Seq Scan on loc_context_terror as i have indexes

[PERFORM] Is Query need to be optimized

2011-02-27 Thread Adarsh Sharma
38.895..183.396 rows=9016 loops=1) Filter: (doc_category = 'Terrorism'::bpchar) Total runtime: 1210.112 ms (15 rows) Best regards, Adarsh Sharma -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance