Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

dbmail_headervalue

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


namailsj at yahoo

Feb 12, 2010, 11:38 AM

Post #1 of 5 (855 views)
Permalink
dbmail_headervalue

In our dbmail environment dbmail_headervalue
table has become very large and DBA is recommending running optimize table. Then I ran into a thread in dbmail archives that if the table dbmail_headervalue is dropped and recreated then it will get re-populated by running "dbmail-util -by", if that is possible then should we run OPTIMIZE TABLE or just drop and recreate the table.

Also we run "dbmail-util- a -y -vv" every night.

Thank you for your input.




_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Feb 13, 2010, 2:20 AM

Post #2 of 5 (812 views)
Permalink
Re: dbmail_headervalue [In reply to]

N Sj wrote:
> In our dbmail environment dbmail_headervalue
> table has become very large and DBA is recommending running optimize table. Then I ran into a thread in dbmail archives that if the table dbmail_headervalue is dropped and recreated then it will get re-populated by running "dbmail-util -by", if that is possible then should we run OPTIMIZE TABLE or just drop and recreate the table.

Dropping, re-creating and re-populating the table is a valid procedure.
However, you will end up with the same sized table.

I've blogged about a better approach on blog.dbmail.eu.


>
> Also we run "dbmail-util- a -y -vv" every night.
>
> Thank you for your input.
>
>
>
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


tabris at tabris

Feb 13, 2010, 10:02 AM

Post #3 of 5 (817 views)
Permalink
Re: dbmail_headervalue [In reply to]

Paul J Stevens wrote:
> N Sj wrote:
>
>> In our dbmail environment dbmail_headervalue
>> table has become very large and DBA is recommending running optimize table. Then I ran into a thread in dbmail archives that if the table dbmail_headervalue is dropped and recreated then it will get re-populated by running "dbmail-util -by", if that is possible then should we run OPTIMIZE TABLE or just drop and recreate the table.
>>
>
> Dropping, re-creating and re-populating the table is a valid procedure.
> However, you will end up with the same sized table.
>
> I've blogged about a better approach on blog.dbmail.eu.
>
>
>
I admit to not having read the post on blog.dbmail.eu yet, but the idea
he's aiming for is something faster than OPTIMIZE TABLE dbmail_headervalue;

For which the obvious intent is to use less disc-space. I'm not sure
this will be relevant, but it is his desire. To shrink the size of the
database file itself. And yes, I know that if you delete from the table,
the leftover spots in the file will get re-used.

He may also want to run ANALYZE TABLE, if he hasn't already.

Running both what you recommend (removing the unnecessary cached fields)
and the OPTIMIZE will produce even _better_ results than either by itself.
>> Also we run "dbmail-util- a -y -vv" every night.
>>
>> Thank you for your input.
>>
>>
>>
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail [at] dbmail
>> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>>
>>
>
>
>
Attachments: signature.asc (0.25 KB)


namailsj at yahoo

Feb 13, 2010, 11:12 AM

Post #4 of 5 (816 views)
Permalink
Re: dbmail_headervalue [In reply to]

Thanks, Its a great blog

Did you use "received" header just as an example in the blog, or is it really safe to delete it from the cache, received header has the biggest number in the table, besides that I see a lots of x- headers in the table which I think are safe to remove.





----- Original Message ----
From: Paul J Stevens <paul [at] nfg>
To: DBMail mailinglist <dbmail [at] dbmail>
Sent: Sat, February 13, 2010 2:20:45 AM
Subject: Re: [Dbmail] dbmail_headervalue

N Sj wrote:
> In our dbmail environment dbmail_headervalue
> table has become very large and DBA is recommending running optimize table. Then I ran into a thread in dbmail archives that if the table dbmail_headervalue is dropped and recreated then it will get re-populated by running "dbmail-util -by", if that is possible then should we run OPTIMIZE TABLE or just drop and recreate the table.

Dropping, re-creating and re-populating the table is a valid procedure.
However, you will end up with the same sized table.

I've blogged about a better approach on blog.dbmail.eu.


>
> Also we run "dbmail-util- a -y -vv" every night.
>
> Thank you for your input.
>
>
>
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail




_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


michael.monnerie at is

May 3, 2010, 3:40 AM

Post #5 of 5 (628 views)
Permalink
Re: dbmail_headervalue [In reply to]

On Samstag, 13. Februar 2010 Paul J Stevens wrote:
> I've blogged about a better approach on blog.dbmail.eu.

There's an error, at least for postgresql 8.4:

CREATE VIEW header_count AS
SELECT count(1) AS count, n.id, n.headername
FROM dbmail_headervalue v
LEFT JOIN dbmail_headername n ON v.headername_id=n.id
GROUP BY n.id;

ERROR: column "n.headername" must appear in the GROUP BY clause or be
used in an aggregate function

just change the last line to
GROUP BY n.id, n.headername;
and it works.

Also, this delete finds zero records:
DELETE FROM dbmail_headername WHERE headername = 'Received';
but this one works (again postgresql 8.4):
DELETE FROM dbmail_headername WHERE headername = 'received';

To make it a simple copy, here are the most often appearing entries
which probably won't be IMAP SEARCHed:

DELETE FROM dbmail_headername WHERE headername = 'received' or
headername = 'x-virus-scanned' or headername like 'x-spam%';

This deleted more than half of our headervalue entries. Afterwards,
running CLUSTER, REINDEX and VACUUM ANALYZE on the two tables is a good
way to gain performance immediately.
For CLUSTER to work, you'd need to have applied the CLUSTER commands
once that I described on http://dbmail.org/dokuwiki/doku.php/performance

I've also put the information from Paul on that page, to keep the
"performance" tips on one page.

--
mit freundlichen Grüssen,
Michael Monnerie, Ing. BSc

it-management Internet Services
http://proteger.at [gesprochen: Prot-e-schee]
Tel: 0660 / 415 65 31

// Wir haben im Moment zwei Häuser zu verkaufen:
// http://zmi.at/langegg/
// http://zmi.at/haus2009/
Attachments: signature.asc (0.19 KB)

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.