Can you please post the entire code as what you sent should trigger no database queries at all: you are not iterating on the results.
Thanks,
Jeremy
Hi,--
When I create query set and then do filter() there are two selects in debug output - first one selects all from table and second is that filter.
QDjangoQuerySet<Table> table;
matched = table.filter(QDjangoWhere("other_id", QDjangoWhere::Equals, otherId)).selectRelated().limit(20,80);Produces:
SELECT `table`.`id`, `table`.`other_id` FROM `table`
SELECT `table`.`id`, `table`.`other_id`, T0.`id`, T0.`name` FROM `table` INNER JOIN `other` T0 ON T0.`id` = `table`.`other_id` WHERE `table`.`other_id` = ? LIMIT 80 OFFSET 20
How should I use the query set to make just the second select? - the first is unnecessary - I am going to have lot of items in table so it would kill the efficiency gained with limit.
Thanks
You received this message because you are subscribed to the Google Groups "QDjango" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qdjango+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
QDjangoQuerySet<Asset> assets;
qDebug() << assets.size();