Re: [PERFORM] Improving Query

2007-10-30 Thread Ketema Harris
I am definitely interested in upgrading. Is there a guide out there that perhaps was created to explain the changes in the config files from 8.1 to 8.2 ? Migration guide I guess? On Oct 30, 2007, at 11:39 AM, Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: Ketema wrote: 5)Upg

Re: [PERFORM] Improving Query

2007-10-30 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Ketema wrote: >> 5)Upgrade version of pg..currently is running 8.1.4 > Well every version gets better at planning, so it can't hurt. +1 ... there are at least two things about this query that 8.2 could be expected to be a great deal smarter about: * mi

Re: [PERFORM] Improving Query

2007-10-30 Thread Ketema Harris
On Oct 30, 2007, at 9:31 AM, Michael Glaesemann wrote: On Oct 30, 2007, at 7:18 , Ketema wrote: here is the execution plan: I've put this online here: http://explain-analyze.info/query_plans/1259-ketema-2007-10-30 I have attached an erd of the tables used in this query. If it is stripp

Re: [PERFORM] Improving Query

2007-10-30 Thread Ketema Harris
On Oct 30, 2007, at 9:23 AM, Richard Huxton wrote: Ketema wrote: I have the following query that is a part of a function: Yikes! Difficult to get a clear view of what this query is doing. It seems complicated because you only have a small subset of the schema these tables tie into. Be hap

Re: [PERFORM] Improving Query

2007-10-30 Thread Michael Glaesemann
On Oct 30, 2007, at 7:18 , Ketema wrote: here is the execution plan: I've put this online here: http://explain-analyze.info/query_plans/1259-ketema-2007-10-30 I have attached an erd of the tables used in this query. If it is stripped out it can be viewed here: http://www.ketema.net/ prov

Re: [PERFORM] Improving Query

2007-10-30 Thread Richard Huxton
Ketema wrote: I have the following query that is a part of a function: Yikes! Difficult to get a clear view of what this query is doing. OK, I'm assuming you're vacuumed and analysed on all these tables... My concern is with the sort step that takes 15 seconds by itself: -> Sort (cost=12

[PERFORM] Improving Query

2007-10-30 Thread Ketema
I have the following query that is a part of a function: select order_details.tpv_success_id, order_details.tpv_id, order_details.ver_code, order_details.app_id, order_details.acct_id, order_details.first_name || ' ' || order_details.last_name as customer_name, order_details.order_

Re: [PERFORM] Improving query performance

2007-03-02 Thread David Leangen
> > And this is the actual query: > > I think you need to look into full-text indexing (see tsearch2). Thanks, Tom. Yes, we know this. This is just a temporary fix that we needed to get up today for biz reasons. Implementing full-text searching within a few short hours was out of the question.

Re: [PERFORM] Improving query performance

2007-03-01 Thread Tom Lane
David Leangen <[EMAIL PROTECTED]> writes: > And this is the actual query: > SELECT COUNT(t0.ID) FROM public.MY_TABLE t0 > WHERE ((POSITION('adenosine cyclic 35-monophosphate' IN LOWER(t0.TITLE)) > - 1) >=0 OR > (POSITION('adenosine cyclic 55-monophosphate' IN LOWER(t0.TEXT)) - 1) >= > 0 OR > (P

[PERFORM] Improving query performance

2007-03-01 Thread David Leangen
Hello! I'm new to performance tuning on postgres. I've read the docs on the posgtres site, as well as: http://www.revsys.com/writings/postgresql-performance.html http://www.powerpostgresql.com/PerfList However, my query is really slow, and I'm not sure what the main cause could be, as there