Why is the primary key on both fields? What situation requires a SELECT with both in the WHERE clause? I would assume you select by collection_id and go through that list to generate visuals for each wiki in the list, right?