Re: [PERFORM] Horribly slow query/ sequential scan

2007-01-09 Thread Nörder-Tuitje , Marcus
Forget abount IN. Its horribly slow. try : select w.appid, w.rate, w.is_subscribed, sum(w.hits) AS Hits, sum(w.sius) AS IUs, sum(w.total_amnt) AS Total, sum(w.hits) * w.rate AS ByHits, sum(w.sius) * w.rate AS BYIUS from bill_rpt_work w where

Re: [PERFORM] Read only transactions - Commit or Rollback

2005-12-20 Thread Nörder-Tuitje , Marcus
afaik, this should be completely neglectable. starting a transaction implies write access. if there is none, You do not need to think about transactions, because there are none. postgres needs to schedule the writing transactions with the reading ones, anyway. But I am not that performance

Re: [PERFORM] Read only transactions - Commit or Rollback

2005-12-20 Thread Nörder-Tuitje , Marcus
Mmmm, good question. MVCC blocks reading processes when data is modified. using autocommit implies that each modification statement is an atomic operation. on a massive readonly table, where no data is altered, MVCC shouldn't have any effect (but this is only an assumption) basing on

[PERFORM] INSERTs becoming slower and slower

2005-12-08 Thread Nörder-Tuitje , Marcus
Title: INSERTs becoming slower and slower Hi, I am breaking up huge texts (between 25K and 250K words) into single words using PgPlsql. For this I am using a temp table in the first step : LOOP vLeft := vRight; vTmp := vLeft; LOOP vChr := SUBSTRING ( pText FROM

Re: [PERFORM] (View and SQL) VS plpgsql

2005-11-10 Thread Nörder-Tuitje , Marcus
snip FOR r_record IN SELECT count(cid) AS hits,src, bid, tid,NULL::int8 as min_time,NULL::int8 as max_time FROM archive_event WHERE inst=\'3\' AND (utctime BETWEEN \'111492\' AND \'1131512399\') GROUP BY src, bid, tid LOOP SELECT INTO one_record MIN(utctime) as

Re: [PERFORM] Inefficient escape codes.

2005-10-20 Thread Nörder-Tuitje , Marcus
I guess, You should check, if a blob field and large object access is suitable for you - no escaping etc, just raw binary large objects. AFAIK, PQExecParams is not the right solution for You. Refer the Large object section: 28.3.5. Writing Data to a Large Object The function int

Re: [PERFORM] Deleting Records

2005-10-20 Thread Nörder-Tuitje , Marcus
what about firing a DELETE FROM qc_session S WHERE EXISTS (SELECT * FROM item_qc_doer i WHERE i.item_id = s.item_id); and DELETE FROM item_qc_doer S WHERE EXISTS (SELECT * FROM item_qc_doer i

Re: [PERFORM] Optimizer misconfigured ?

2005-10-14 Thread Nörder-Tuitje , Marcus
Nachricht- Von: Richard Huxton [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 13. Oktober 2005 12:22 An: Nörder-Tuitje, Marcus Cc: pgsql-performance@postgresql.org Betreff: Re: [PERFORM] Optimizer misconfigured ? Nörder-Tuitje wrote: Hello, I have a strange effect on upcoming structure