[Dbix-class] Fastest method to check for key existence?
David Cantrell
david at cantrell.org.uk
Thu Feb 12 12:29:57 GMT 2015
On Thu, Feb 12, 2015 at 12:25:55PM +0000, Lianna Eeftinck wrote:
> Or just use ->count, which doesn't need to retrieve and instantiate the
> objects.
Something like this:
SELECT COUNT(*) FROM foo WHERE bar IN ('ant', 'bat', cat', 'dog');
might tell you that two of them exist, but I got the impression that the
important information which *which* two exist.
--
David Cantrell | Minister for Arbitrary Justice
Eye have a spelling chequer / It came with my pea sea
It planely marques four my revue / Miss Steaks eye kin knot sea.
Eye strike a quay and type a word / And weight for it to say
Weather eye am wrong oar write / It shows me strait a weigh.
More information about the DBIx-Class
mailing list