asp.net - 如果列表包含超过 1000 个元素,则 Where 子句中的 Contains() 在 Oracle 上失败,使用 LINQ ef core .net
问题描述
在使用 ef core linq 和 oracle 的 asp.net 中,无法使用 where 子句 contains(>1000) 获取大于一千个 id 的数据。有没有其他选择?
解决方案
是的; 将这些 ID 存储到表中并在子查询中使用它。例如:代替
where id in (1, 2, 3, ..., 5000)
这将是
where id in (select id from separate_table)
推荐阅读
- heroku - 如何使用 Heroku 部署的 Flask 应用程序处理 model.predict 上的超时错误?
- python - 删除字典键中的空格
- excel - 获取所有组合,其中第一项的顺序很重要,但其余的顺序不重要
- embedded - 任务和优化编译器之间的区别
- c++ - 从 SDL 库中的函数返回的指针
- reactjs - React JSX 如何将父自定义反应组件状态属性值传递给子客户组件?
- r - 如何在 ggplot2 R 折线图中获得插值
- python - Python multiprocess.pool 将从父进程分叉大内存
- python - 每次在文件中找到一个单词时,如何让我的文本编辑器 Python 插件执行?
- python - For 循环中的 to_csv 命令未按预期工作