Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use force index when using ORM? #3261

Closed
g1012415019 opened this issue Jan 12, 2024 · 0 comments
Closed

How to use force index when using ORM? #3261

g1012415019 opened this issue Jan 12, 2024 · 0 comments

Comments

@g1012415019
Copy link

gf Version: v1.16
For example:
dpdFields := "count(case when rob='blue' && back_tag=0 then 1 end) as count" + ",sum(order_item_addition.discount_money) as discount_amt_total" err = u.DB().Model("order_item_addition"). InnerJoin("order", "order_item_addition.order_id = order.id"). Where(commWhereStr). Fields(dpdFields). Scan(&prodDisItem)

  1. order_item_addition Use FORCE INDEX ( idx_test1 )
  2. order Use FORCE INDEX ( idx_test1 )

How to use?

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant