Home > database > If the where condition in the SQL query in the parameters in the more than one thousand or more gene
If the where condition in the SQL query in the parameters in the more than one thousand or more gene
Time:09-18
This query is similar to batch query, a parameter to carry multiple values, query the multiple records, have a great god can teach a few action in the face of this kind of question solution,
CodePudding user response:
In (1, 2, 3) or in (4, 5, 6)
CodePudding user response:
Insert the parameters into the temporary table, then associate the temporary table query
CodePudding user response:
In more than 300, performance will be serious decline, according to the 2 # advice, write temporary tables, relational query again,
CodePudding user response:
If built a temporary table to the database read and write operations are frequent, and requirements database to read and write performance is good, otherwise the query time will be longer,
CodePudding user response:
Won't, you to write so few data in the table, than in the performance of the decline, is nothing, can do the test,
CodePudding user response:
In back up to 999, performance degradation, Suggestions can substitute the exists,
CodePudding user response:
WITH the AS WITH A together, when A temporary table