Às 08:13 de 24/02/20, Константин Комков escreveu:
*Villas*, I can explain why I need to delete many records. I have template of
timetable (example upper in my post). There is templates for each group for
each faculty in university. ~40 groups = 40 templates for each faculty.
When I do timetable I need to do next operations:
* Select all active groups for faculty (1 query);
* Select holidays from production calendar (directory table in database, 1
query);
* Get template for each group (start cycle, no query becouse get from
sessions);
* Delete previous timetable becouse I don't know what is new in template and
I don't know it is new template or old (~400 record);
* Select all subjects, hours for subjects and schedule of educational
process in a group (1 procedure);
* Find period of teoretical occupations in a schedule;
* There is two check of template and correct it if it is necessary (updating
rule in template ~2 rows);
* Insert lesson to database in cycle start with first date of teoretical
occupations if date corresponds all rules in a template and not holidays
and hours for a subject > 0 (~400 record);
* Create report about group (see picture).
As result we have 40 * 400 = 16000 rows for deleting and 16000 rows for
inserting. But there is fuculty with 56 groups then ~22400 rows for delete and
insert. Becouse I told 25000 rows it is max.
Let's talk about *IIS* settings, becouse if I do that on *Rocket *server all
work. But on IIS without deleting at all I have problem with inserting 5000 rows.
Thank you for attention!
Hi,
I would suggest you try to optimize all those queries in the database first in
order to optimize the process. In any case, it surely is a database issue and
not a Web2py one.
Regards,
Carlos Correia
=========================
MEMÓRIA PERSISTENTE
GSM: 917 157 146
e-mail: ge...@memoriapersistente.pt
URL: http://www.memoriapersistente.pt
XMPP (Jabber): car...@memoriapersistente.pt
GnuPG: wwwkeys.eu.pgp.net
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/9f28bfc0-ef07-4acb-2b36-61891f1e510f%40memoriapersistente.pt.