0

I have a few cases in my application that I would like to execute INSERT DELAYED rather than the standard INSERT to speed up the script performance. I have a script that inserts hundreds of rows and might benefit from that feature.

I've read that INSERT DELAYED hasn't been implemented yet in zend framework 1 ( http://framework.zend.com/issues/browse/ZF-9484 ).

Anyone knows on a workaround?

aporat
  • 5,922
  • 5
  • 32
  • 54

1 Answers1

3

You should be able to access the PDO object through Zend. Something like (untested):

Zend_Db_Table_Abstract::getAdapter()->getConnection()->query('INSERT DELAYED...');

Zend_Db_Table_Abstract::getAdapter()->getConnection() Should be a PDO object.. once you have that you can execute any query you want.

Mike B
  • 31,886
  • 13
  • 87
  • 111
  • thanks! I was hoping to use the insert() function somehow, but i guess I'll have to wait for it to be implemented in the zend_db component – aporat Apr 30 '12 at 19:10
  • 1
    INSERT DELAYED is a MySQL extension, so it is unlikely this will ever be added to Zend_Db (which is a DB abstraction layer). – Tim Fountain May 01 '12 at 11:24