pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Matthew Schumacher <matt.s@aptalaska.net>
To: John A Meinel <john@arbash-meinel.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problems testing with Spamassassin 3.1.0
Date: Thu, 04 Aug 2005 14:37:41 -0800
Message-ID: <42F298B5.5010405@aptalaska.net> (raw )
In-Reply-To: <42F26E2C.8010607@arbash-meinel.com >
References: <42E9749F.6000709@aptalaska.net >
<1122616211.5691.340.camel@lamb.mcmillan.net.nz >
<42EA6966.8090402@aptalaska.net >
<1122668371.5691.352.camel@lamb.mcmillan.net.nz >
<19405.1122670917@sss.pgh.pa.us >
<42EAA410.9010700@aptalaska.net >
<27897.1122748133@sss.pgh.pa.us >
<42EE8043.1050207@aptalaska.net >
<op.suulgxokth1vuj@localhost >
<42EE93F8.5010003@aptalaska.net >
<20050801214931.GF60019@decibel.org >
<42EE9D83.8000405@pobox.com >
<42F1CE43.8040801@aptalaska.net >
<15610.1123166222@sss.pgh.pa.us >
<42F23FB6.5010405@aptalaska.net >
<42F251F0.1070407@aptalaska.net >
<42F26E2C.8010607@arbash-meinel.com >
John A Meinel wrote:
> Surely this isn't what you have. You have *no* loop here, and you have
> stuff like:
> AND
> (bayes_token_tmp) NOT IN (SELECT token FROM bayes_token);
>
> I'm guessing this isn't your last version of the function.
>
> As far as putting the CREATE TEMP TABLE inside the function, I think the
> problem is that the first time it runs, it compiles the function, and
> when it gets to the UPDATE/INSERT with the temporary table name, at
> compile time it hard-codes that table id.
>
> I tried getting around it by using "EXECUTE" which worked, but it made
> the function horribly slow. So I don't recommend it.
>
> Anyway, if you want us to evaluate it, you really need to send us the
> real final function.
>
> John
> =:->
It is the final function. It doesn't need a loop because of the
bayes_token_tmp function I added. The array is passed to it and it
returns a record set so I can work off of it like it's a table. So the
function works the same way it before, but instead of using SELECT
intoken from TEMPTABLE, you use SELECT bayes_token_tmp from
bayes_token_tmp(intokenary).
I think this is more efficient than the create table overhead,
especially because the incoming record set won't be to big.
Thanks,
schu
view thread (62+ messages) latest in thread
Message-ID: <42F298B5.5010405@aptalaska.net>
Permalink: ../42F298B5.5010405@aptalaska.net/
Also on: postgresql.org/message-id/42F298B5.5010405@aptalaska.net
copy link · copy postgr.es
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: matt.s@aptalaska.net, john@arbash-meinel.com
Subject: Re: Performance problems testing with Spamassassin 3.1.0
In-Reply-To: <42F298B5.5010405@aptalaska.net>
* 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