note 57564 modified in function.mysqli-stmt-bind-result by danbrown

From: Date: Fri, 28 Nov 2008 22:36:23 +0000
Subject: note 57564 modified in function.mysqli-stmt-bind-result by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147364@lists.php.net to get a copy of this message
If you select LOBs use the following order of execution or you risk mysqli allocating more memory that actually used 1)prepare() 2)execute() 3)store_result() 4)bind_result() If you skip 3) or exchange 3) and 4) then mysqli will allocate memory for the maximal length of the column which is 255 for tinyblob, 64k for blob(still ok), 16MByte for MEDIUMBLOB - quite a lot and 4G for LONGBLOB (good if you have so much memory). Queries which use this order a bit slower when there is a LOB but this is the price of not having memory exhaustion in seconds. --was-- If you select LOBs use the following order of execution or you risk mysqli allocating more memory that actually used 1)prepare() 2)execute() 3)store_result() 4)bind_result() If you skip 3) or exchange 3) and 4) then mysqli will allocate memory for the maximal length of the column which is 255 for tinyblob, 64k for blob(still ok), 16MByte for MEDIUMBLOB - quite a lot and 4G for LONGBLOB (good if you have so much memory). Queries which use this order a bit slower when there is a LOB but this is the price of not having memory exhaustion in seconds. http://php.net/manual/en/function.mysqli-stmt-bind-result.php

« previous php.notes (#147364) next »