Subj : searching based on 2 keys To : comp.programming From : hungryforc Date : Thu Jun 30 2005 10:15 am Hello, Suppose I have the following table: key value ---- ----- 2 foo 24 bar 12 baz Now I need an efficient algorithm so that I can search based on either the key or the value. One of the solutions is to use 2 tables - but we are heavily memory constrained and that is not a solution. Are there any other suggestions that I can try? Thanks, ~Gee .