pdoResources and parents

If I define the parents as 'parents' => '2' showLog shows the generated IN clause to include all the children

modResource.parent:IN(2,3,4,7,8,9)

Since container resource 2 is going to have 100s of children is this going to make the SQL statement very slow?

Thanks
Mark
27 января 2014, 10:48
modx.pro
1 769
0

Комментарии: 2

Василий Наумкин
27 января 2014, 14:55
0
Use parameter &depth
[[!pdoResources?
	&parents=`2`
	&depth=`0`
]]
And you will receive
modResource.parent:IN(2)
    Mark
    27 января 2014, 15:00
    0
    Perfect, thanks!
      Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
      2