Witam.
mam taka tabele
CREATE TABLE 'test'(
id int not null auto_increment,
typ1 int not null default 0,
typ2 int not null efault 0,
INDEX `typ1` (`typ1`),
INDEX `typ2` (`typ2`)
);
Chcialbym uzyskac odczyt z typ1, typ2 uzyciem indexu np cos takiego : SELECT id, typ1, typ2 FROM test WHERE typ1=9 OR typ2=9. Oczywiscie w tym wypadku zapytanie nie uzyje indexu. Prosilbym o jakies sugetie. Dzieki.
aha czy uzycie UNION w tym wypadku jest wydajne?