Jump to content

Big data issue


rusjoan
 Share

Recommended Posts

Hi!

This topic is not about a real big data, but nonetheless PW can't hold it

I created a template ("task") with couple of text fields and one repeater field. This repeater has 3 text fields and 2 textarea fields.

There are 2374 pages using this template. When I've decided to restructure my DB I went in a real trouble.

Restructuring is in that I make new template with all of mentioned repeater fields and I remove 2 "massive" textarea fields from repeater. Then task-template pages should become smaller in DB and I'll get ability to do stats analysing faster, and task page still can get 2 textarea fields values from another page if needed.

I moved all of mentioned 2 fields data to new pages then tried to remove these fields from repeater.

But here's what I've got:

Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 81 bytes)  

Then I launched script to clear values in these fields (set to ""). This was slow and boring but it's done.

And after new attempt I've got the same error.

My suggestion is: script, that removes fields, tries to do $pages->find() for all of pages that use given field. But data size from DB is too big to locate in allowed RAM — textarea uses MEDIUMTEXT innodb type what's about 16 Mib. This case is why I made my script to clear fields values by iterations of 10-50 pages to avoid memory overflow.

How I can remove these fields? The only solution is to temporarily give PW more RAM by performing ini_set( )?

Link to comment
Share on other sites

Restructuring is in that I make new template with all of mentioned repeater fields and I remove 2 "massive" textarea fields from repeater. 

they.not massive unless you fill. thems up

textarea with.5k text takes up 5 kilobites not 16 megobytes

Then I launched script to clear values in these fields (set to ""). This was slow and boring but it's done.

this do.nothing 

see above

How I can remove these fields? The only solution is to temporarily give PW more RAM by performing ini_set( )?

you see this -> dev commit

mabe u need dev branch ?

  • Like 3
Link to comment
Share on other sites

Woohoo! Thank you guys, now it works!

I simply copied those files of mentioned commit because I have no idea how to work with 2 repos in one git-project while all of your dirs except "wire" should contain only your data but not from PW-repo. Maybe anyone can tell me about the way to keep PW up-to-date?

Then I launched script to clear values in these fields (set to ""). This was slow and boring but it's done.

this do.nothing 

see above

@WillyC there were most of pages with filled fields

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...