Projekt

Allgemein

Profil

Aktionen

GX-Bug #65261

geschlossen

E-Mail Seite funktioniert bei sehr vielen E-Mails > 100000 nicht mehr. / E-mail page does not work anymore with many e-mails > 100000.

Von Till Tepelmann vor mehr als 4 Jahren hinzugefügt. Vor mehr als 4 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Daniel Wu
Kategorie:
Adminbereich
Zielversion:
% erledigt:

100%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
3.15.2.0, 3.15.2.1
Release Notes Langtext:

Filter werden nur dann angewendet, wenn ein Teil des Textes im Filterfeld eingegeben wird. Es wurden einige Indizes erstellt, um die Leistung der Suche in den Tabellen emails und email_contacts zu erhöhen.


Beschreibung

E-Mail Seite funktioniert bei sehr vielen E-Mails > 100000 nicht mehr, da hier dann die SQL Befehle extrem inperformant sind. Hier wäre eine Lösung den SQL Befehl aufzuspalten und in mehrere SQL Befehl umzuschreiben.

  1. Suchen bzw. Filtern
  2. die IDs aus dem anderen Tabellen raussuchen
  3. mit Order by sortieren
  4. nur 20 Einträge mit Limit anzeigen

E-Mail page does not work with many e-mails > 100000, because the SQL commands are extremely inperformant. Here a solution would be to split the SQL command and rewrite it into several SQL commands.

  1. search or filter
  2. select the IDs from the other tables
  3. sort with Order by
  4. show only 20 entries with limit

SELECT DISTINCT emails.*
FROM emails
LEFT JOIN email_contacts ON email_contacts.email_id = emails.email_id
LEFT JOIN email_attachments ON email_attachments.email_id = emails.email_id
WHERE emails.subject LIKE '%%' ESCAPE '!'
OR emails.content_html LIKE '%%' ESCAPE '!'
OR emails.content_plain LIKE '%%' ESCAPE '!'
OR emails.creation_date LIKE '%%' ESCAPE '!'
OR emails.sent_date LIKE '%%' ESCAPE '!'
OR email_contacts.email_address LIKE '%%' ESCAPE '!'
OR email_contacts.contact_name LIKE '%%' ESCAPE '!'
OR email_attachments.path LIKE '%%' ESCAPE '!'
OR email_attachments.name LIKE '%%' ESCAPE '!'
ORDER BY creation_date DESC
LIMIT 20


Aktionen

Auch abrufbar als: Atom PDF