Advanced: mysqli_stmt extending fetch

2 replies
------------------------------------
#advanced #extending #fetch #mysqlistmt
  • Profile picture of the author SteveSRS
    Hey Terry,

    Perhaps stupid questions but why not just use PDO?

    I'm don't have a lot of experience with Mysqli because I always use PDO ..
    However note even with PDO the fetchAll command is said to be relatively slow and just looping over Fetch() is actually faster!
    {{ DiscussionBoard.errors[7390848].message }}
    • Profile picture of the author Terry Crim
      [DELETED]
      {{ DiscussionBoard.errors[7403256].message }}
  • Profile picture of the author SteveSRS
    Hey Terry,

    Haha you sure write a lot but I like it as I said I'm not too helpful on Mysqli as I decided to go with PDO from the beginning after reading a whole lot of opinions and looking at examples..

    Since then I'm just using 1 PDO wrapper class for all and very rarely I updated it to add some extra functionality..

    I've never had any problems with PDO but I run PHP 5.3..

    I found this an interesting comment:
    ========
    - MySQL MyISAM mainly due to INNODB ends up corrupting data on my testing environment and for the types of calls I am doing MyISAM is much faster.
    =======

    I'm running a Galara Cluster which makes it I have to use InnoDB but I've had corrupted data now a few times (since some galarea updates last half year it is a LOT better already) but I indeed found InnoDB to have to more often and it is hard to repair (MyIsam can be fixed by running some commands from command line 99% of the cases)

    However MyIsam isn't always faster, actually if you use innodb on how it is intended it is almost always faster when using on more complex db's (however I must admit I'm not doing this either).. I'm talking about the use of foreign keys..
    Of course the advantage of this is biggest when db is in Normal Form (BCNF)

    In your other thread I posted a link about query catching at the bottom it has a link to memcached have a look at this if you don't already know it.. it is AWESOME..
    From what I've read you should use memcacheD not memcache..

    Again I just went with memcached never tried to other one based on my readings..
    it is super easy to implement (especially if you already have a db wrapper class) and it is speed up magic
    {{ DiscussionBoard.errors[7408075].message }}

Trending Topics