In the PHP manual it states:

PDO::CURSOR_FWDONLY (integer 
<http://php.net/manual/en/language.types.integer.php>)Create a PDOStatement 
<http://php.net/manual/en/class.pdostatement.php> object with a 
forward-only cursor. This is the default cursor choice, as it is the 
fastest and most common data access pattern in PHP.
So I don't think it's a bad idea, but I don't know the reasoning the 
reasoning for using SCROLL over FWDONLY.

On Thursday, August 14, 2014 6:38:47 AM UTC-6, ravag...@gmail.com wrote:
>
> I'm not sure if this is really a good idea.
> See:
> http://stackoverflow.com/questions/1155211/what-is-pdo-scrollable-cursor
>
> But if you want this find its way into the core, then you can help the 
> core team to get in there.
>
> Help yourself by either:
> a) Create an issue explaining everything on GitHub 
> https://github.com/cakephp/cakephp/issues/new
> b) Fork the code, change it, prove that it really solves the problem 
> without breaking anything else and create a Pull Request 
> https://github.com/cakephp/cakephp/
>
> Thanks
> Marc
>
> Am Mittwoch, 13. August 2014 16:07:26 UTC+2 schrieb Jordan Hopfner:
>>
>> Thanks Alan, appreciate the help. The project has been put on hold for 
>> now but I'll definitely try this change when I go to use SQL Server again. 
>> It would be great if the core team would make these changes to Cake :)
>>
>> On Friday, August 8, 2014 10:30:20 PM UTC-6, Alan Read wrote:
>>>
>>> Changing the line:
>>>
>>> 772) $prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL);
>>>
>>> to
>>>
>>> 772) $prepareOptions += array(PDO::ATTR_CURSOR => PDO::*CURSOR_FWDONLY*
>>> );
>>>
>>> in the _execute function inside of Sqlserver.php solved this issue for me
>>>
>>> On Wednesday, May 28, 2014 5:19:09 PM UTC-4, Jordan Hopfner wrote:
>>>>
>>>> Hey guys,
>>>>
>>>> I'm using the latest version of Cake (2.5.1) and am having a problem 
>>>> with extremely slow connections to a MSSQL server. A controller action 
>>>> that 
>>>> only has one simple select statement is taking an upwards of 50 seconds to 
>>>> complete. I don't think it's the select statement itself, I have a created 
>>>> an empty page that connects to MSSQL via PDO and executes the exact same 
>>>> statement and the result is instantaneous, so this leads me to believe 
>>>> it's 
>>>> a problem with the MSSQL data source packaged with Cake. If it was a 
>>>> driver 
>>>> or connection issue I would assume it would happen on the test page as 
>>>> well. Any ideas? I'm on PHP 5.3.x and am connecting to SQL Server 2008 R2.
>>>>
>>>> Jordan
>>>>
>>>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to