↧
Answer by Evan Carroll for PostgreSQL - Working with array of thousands of...
Is there a better way of doing this? Yes, use a temp table. There is nothing wrong with creating an indexed temp table when your query is that insane.BEGIN; CREATE TEMP TABLE myitems ( item_id int...
View ArticlePostgreSQL - Working with array of thousands of elements
I'm looking to select rows based on whether a column is contained in a large list of values that I pass as an integer array.Here's the query I currently use:SELECT item_id, other_stuff, ...FROM (...
View Article