0

This may seem an obvious question, but I don't know the answer, and I can't find anything on Google or in the Doctrine manual.

Does Symfony2 / Doctrine automatically create indexes? I use the automatic Entity-create functions in Symfony2 and that is as close as I get to the DB. I think that's called using the Doctrine ORM.

I'm thinking that Doctrine doesn't support it, but I'd kick myself if I went manual when I didn't need to.

I'm thinking Doctrine doesn't do this for you because Doctrine doesn't know what kind of queries you may be making (my understanding of DB indexing is you focus on the types of queries you're making), but then I'm thinking Doctrine takes all this away from you anyway (how it constructs its queries).

Normally I would just do a SELECT a, b FROM table WHERE c > 50 and maybe index column 'c', but I can't think what the best way is with Doctrine.

I know it's an easy few word answer, but I can't think where else to get a definitive answer. Thanks in advance.

4

1 に答える 1