Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 PM Mod: Send to all members
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 10 March 2005 :  07:05:26  Show Profile
Has anyone modified the send to all members feature of the PM mod to make it a little less resource instensive? At the moment it requires an SQL statement for each member receiving the message as well as sending out an e-mail alert to those who have this option turned on. Not the best way of doing it if you've got a couple of thousand members. What I was thinking was, if a message gets sent to all members, privatesend_info.asp sends the details to another file via an XML feed. This file will then send the message out to, say, 100 members at a time with a user defined time delay before moving on to the next hundred? Anyone any ideas?

<edit> Bump! Sorry! </edit>


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 31 May 2005 06:18:42

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 31 May 2005 :  08:15:37  Show Profile  Visit MarcelG's Homepage
Sounds very interesting...but my XML knowledge is zero to none, so I'm afraid I won't be able to help you.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 May 2005 :  08:55:06  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I'm pretty sure its possible to send the private message to all members with one sql UPDATE statement however sending the email would still need to be iterated through as each email will contain user specific details.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 May 2005 :  09:01:42  Show Profile
Can you insert new records into a table using an UPDATE statement? If I could get it set up so that I can send a message to all members with one SQL statement, I could then use this to send out the notification manually (if I can get it set up, of course )


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 May 2005 :  09:11:20  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Sorry. I meant INSERT and on second thoughts it probably isn't possible.

There is another way if your using SQL Server. I'll try to find a link to an article I was reading yesterday. Basically you could send an xml file containing 100's of members details (pm's) to sql server in one query.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 May 2005 :  09:12:57  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Article is here - http://www.sql-server-performance.com/jb_openxml.asp

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 May 2005 :  09:12:58  Show Profile
Sound interesting, but unfortunately I'm on MySQL


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 May 2005 :  09:16:29  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
If your version of MySql supports stored procedures you could send the pm followed by the unique details (member id) needed to insert each record.

e.g. EXEC pm_bulk_insert 'PM MEssage goes here' '1' '2' '3' '4' etc.

and have the stored procedure iterate through each member id and insert the relevant record.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 May 2005 :  09:26:06  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Hmmm.. This page would seem to suggest that it is possible to use INSERT to create multiple rows.

http://dev.mysql.com/doc/mysql/en/insert-speed.html

quote:
You can speed up INSERT operations that are done with multiple statements by locking your tables:

LOCK TABLES a WRITE;
INSERT INTO a VALUES (1,23),(2,34),(4,33);
INSERT INTO a VALUES (8,26),(6,29);
UNLOCK TABLES;

A performance benefit occurs because the index buffer is flushed to disk only once, after all INSERT statements have completed. Normally there would be as many index buffer flushes as there are different INSERT statements. Explicit locking statements are not needed if you can insert all rows with a single statement.


I'll see if I can find out how.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07