William King
William King

Reputation: 1268

SphinxQL with php mysqli/pdo and prepared statements

When querying Sphinx through SphinxQL would you gain the standard benefits of using mysqli/pdo in PHP?

In additions is there any benefit to using prepared statements with SphinxQL? Are they even supported?

Upvotes: 1

Views: 1597

Answers (1)

barryhunter
barryhunter

Reputation: 21091

I don't think proper binary (ie in the protocol - server-side) prepared statements are supported. It would have to be software emulated (client-side), which wouldn't bring much benefit.

In general one of the main reasons (other than sql injection protection) for prepared statements, is to avoid the overhead of full SQL parsing on every command. the sql dialect understood by sphinx is much simpler than a full blown database server, so it should in general be much quicker that parsing the incoming statements.

You may as well use mysqli I would think, but PDO wouldnt bring much benefit.

But at the end of the day, use which is most familiar to you, rather than worrying about the tiny benefits each might bring :)

Upvotes: 4

Related Questions