I dont konw if I need to post this here or in the Mysql forum but.. here is my questions:
1. I have php code that use mysqli and I want to make the update statments faster, if I add DISABLE KEYS it works X2 faster , but sometimes he not updating anything on the DB, I dont konw way.
Can someone explain me where should I use DISABLE KEYS and why its make the update faster?
2. I tried to use prepare statments for faster updates, but its not working inside the functions.. i want it to be like this:
<?php
prepare update statment (outside the functions)
function name($somthing)
{
code...
exceute the prepared statment..
code..
}
code not in function..
calling to the function..
?>
I even try to put the prepard statment inside the () of the function and the call but its not work.. how can I use inside function prepard statment from outside the function?
1. I have php code that use mysqli and I want to make the update statments faster, if I add DISABLE KEYS it works X2 faster , but sometimes he not updating anything on the DB, I dont konw way.
Can someone explain me where should I use DISABLE KEYS and why its make the update faster?
2. I tried to use prepare statments for faster updates, but its not working inside the functions.. i want it to be like this:
<?php
prepare update statment (outside the functions)
function name($somthing)
{
code...
exceute the prepared statment..
code..
}
code not in function..
calling to the function..
?>
I even try to put the prepard statment inside the () of the function and the call but its not work.. how can I use inside function prepard statment from outside the function?
Comment