Opened 14 years ago

Closed 13 years ago

#238 closed defect (fixed)

[PATCH] more efficient cache submission query

Reported by: dmorton Owned by: dmorton
Priority: normal Milestone: 1.0.2
Component: PHP scripts Version: 1.0.0 RC6
Severity: normal Keywords:
Cc:

Description

The original query used by ham-cache.php and such ran through all of the users cache in a slect, and then issued an update if it was found in the submission. The dgm theme reduces that down to just doing an update per item found in the submission.

An even more efficient way to do it is to do a:

UPDATE maia_mail_recipients SET type=? where recipient_id=? and mail_id IN (?);

where the last parameter is a list of id's... 1,4,7,8,34

This would do only one query, which is much easier on the sql server...

Attachments (2)

maia-traffic.png (4.8 KB) - added by dmorton 14 years ago.
traffic spikes caused by submission of 100 items.
inpatch.patch (12.2 KB) - added by dmorton 13 years ago.
first running draft

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by dmorton

traffic spikes caused by submission of 100 items.

comment:1 Changed 14 years ago by dmorton

  • Milestone changed from 1.0.0 to 1.1.0

comment:2 Changed 13 years ago by rjl

  • Milestone changed from 1.1.0 to 1.0.2
  • patch set to 0

comment:3 Changed 13 years ago by dmorton

This should be easy once #300 is complete

Changed 13 years ago by dmorton

first running draft

comment:4 Changed 13 years ago by dmorton

  • patch changed from 0 to 1
  • Summary changed from more efficient cache submission query to [PATCH] more efficient cache submission query

comment:5 Changed 13 years ago by dmorton

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.