Form is very very slow

I have a form > FIR system with following fields.

FIR No.
FIR Date
District
Police Station
Complainant Name
Address
Incident Date
Section of Law
Document .PDF
Unique Code No.
User
Accused

SAVE

1. Where District and Police Station are cascading dropdown from another table.

District | Police Station
Arariya | Tarabari PS
Arariya | Araria PS
Arariya | Bausi PS
Arariya | Bhargama PS
Arariya | Chakkarbanda PS
Arwal | Arwal PS
Arwal | Banshi PS
Arwal | Kaler PS
Arwal | Karpi PS
Arwal | Kinjar PS
.... | ....

2. Accused is a repeat group > online_fir_21_repeat___Accused
3. Display mode is Merge rows and reduce data in Data > Joins


The form has entry of only 47000 data and repeat group has 150000 data. As understood from the Fabrik guide, form should be able to take millions of entry, but with only 47000 data the table has become painstakingly slow.

Please advise if how can I speed up the form.
 
It's almost certainly an issue with your CDD not using a unique FK, or one or more joins not using the PK as the "value".

Try switching the join display mode from "Merge and reduce" to individual rows, and see if you get unexpected multiple row per form.

Can you describe your data structure.

-- hugh
 
Ok I will try to explain.

I have tables:

Bihar District: id, date_time, State, District
Police Station: id, date_time, District, Police Station

Now Bihar District has entry for all the districts. So, Police Station has database join for District from Bihar District. After this we have done entry for 960 police stations in 52 districts.

Now in FIR module, I again have two fields for District and Police Stations. Till now I was using following structure:

For District: database join [ Data --> table: Police Station, value: District, Label: District ]
and For Police Station: cascading dropdown [ Data --> table: Police Station, value: Station, Label: Station ]
[ Watch --> watch element: District, foreign key: District]

When in FIR module, I change value to id[recommended] in District than in front end form I get repeated elements like Patna, Patna, Patna and in Police station I just get Please select.

I don't understand where am I going wrong? Otherwise site is working, but its just taking too too long to open and crashing the server very often.

Regards
 
Your setup needs to be:

District join dropdown: value: id, label: District
Police Station CDD dropdown: value: id, label: Police Station, watch element: District, Foreign Key: id

-- hugh
 
Hi Hugh,

Thanks for your reply. I have done the setting you mentioned for Police Station and that seems to be working.
But for District join dropdown when I use value: id, label: District for some how when I call them in another module it just shows numbers and too repetitive.

Like in FIR module, I get this sort of values:

District: 2, Police Station: A Station
District: 2, Police Station: B Station
District: 2, Police Station: C station
District: 3, Police Station: D Sation
District: 3, Police Station: E Station
District: 3, Police Station: F station
and so on.
 
URGENT REQUIREMENT:

I am running this project for last one year. It has now over 63ooo records now in one of the List (FIR). But the problem is that now it has become very very slow. There has to be 500 entry everyday in this list and this project will continue to run for years.

I am afraid that since it has already become so slow, it may crash soon anytime. I need help with this project. Demo site at www.nilus.in/Demo/SCRB

In FIR List, there are these two fields that is causing this issue (District and Police Station). One is database join and another cascading dropdown. I am ready to pay the moderate fee for the services as it is an urgent requirement.
 
OK, yes, the problem is what said it probably was. Your District join and Police Station CDD on the FIR list aren't using the 'id' (primary key) elements as their values, so the FK isn't unique. And the District join in the Police Station isn't using the id as the key either.

In fact, none of the join elements are using the 'id' as their value.

Yes, I'll need MySQL access. And this may take some time to fix.

-- hugh
 
I deleted your post - I think you meant to send that to me in PM, it had your CPanel login.

Sorry you'll have to type that all over again, but I had to get that out of public view as soon as possible!

-- hugh
 
OK, no need to retype it - I briefly un-deleted it and copied the content.

However, I strongly suggest as soon as I'm done you change all those passwords, just in case a search engine captured the page.

-- hugh
 
OK, I think we've made good progress, got the FIR table and associated joins fixed.

Sent you PMs, waiting for you to check the list, make sure the data looks sane.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top