|
Post by Old Shendemiar on Feb 20, 2004 19:05:22 GMT
How can i define how much the queried records take up space? (i need to do somekind of quota-system)
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Feb 20, 2004 20:26:05 GMT
Why not
space=number_of_records_affected * record_size
This is simplest possible method. But I don't know how it will behave with varchars...
If you want smarter approach and better results, check
6.9.2 Query Cache Configuration
in the MySQL Reference Manual.
Hope it helps!
|
|
|
Post by Old Shendemiar on Feb 20, 2004 20:45:22 GMT
Why not space=number_of_records_affected * record_size This is simplest possible method. But I don't know how it will behave with varchars... I was kind of hoping for super-easy way My comp if Messed up! Need to boot
|
|
|
Post by Old Shendemiar on Feb 20, 2004 20:51:19 GMT
I had sozens of php.exe's and quite several apache.exes open and my code stopped working! Then i lost part of my keyboard!
Isnt that strange! It all started when i used phped's debugger!
|
|
|
Post by Old Shendemiar on Feb 20, 2004 20:54:10 GMT
No... my code is doing it!
Browser cant load the whole page, each try opens new php.exe!
Page stops usually at image? Can it be something with XP's file acces restrictions?
|
|
|
Post by Old Shendemiar on Feb 20, 2004 21:18:49 GMT
Im slowly getting to the problem... It was a long line with complicated calls with array references. Seems like splitting it up to multiple lines is helping....
I just might get to the original issue....
|
|
|
Post by Old Shendemiar on Feb 20, 2004 21:21:30 GMT
Man this is annoying....
If i have many identical records (exept the id) it seems to freeze!
|
|
|
Post by Old Shendemiar on Feb 20, 2004 21:28:01 GMT
NO!
If i have more than 5 rows in a result then it goes nuts!
|
|
|
Post by Old Shendemiar on Feb 20, 2004 21:36:25 GMT
If i cut down the amouth of columns that PHP prints, it allowsm more rows, so it must be something to do with PHP/Apaches internal memory capacity?
|
|
|
Post by Old Shendemiar on Feb 20, 2004 21:58:42 GMT
Now i did the following:
I put the page to load on my browser... it "freezed" and showed nothing. Then i killed the php.exe vie taskmanager, and isntantlly the page appeared completely and correctly to the browser.
The code also works smoothly on phped's debugger.
So any idea even of the directions that i should be looking into with this?
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Feb 20, 2004 22:23:35 GMT
I don't think your problems are phped- or phpdbg-related.
Maybe it's poor apache/xp compatibility? I run the same config on my win2k machine with 512 megs of RAM and it runs smoothly.
And it's probably got nothing to do with memory issues or number of records. I'm working with thousands of records that are selected, inserted, deleted and updated in big chunks and I've had no problems so far.
Double-check your code, there's where problems probably are. And be careful with those arrays - they can be real cpu/space/memory consumers!
|
|
|
Post by Old Shendemiar on Feb 20, 2004 22:32:45 GMT
Yeah!
It was complicated code... I made cells "by hand" not by function and thus reduced nested function call significantly and it works...
But i still dont understand why it didn't work...
|
|