Table indexes in a SELECT with JOIN´s

Поиск
Список
Период
Сортировка
От JORGE MALDONADO
Тема Table indexes in a SELECT with JOIN´s
Дата
Msg-id CAAY=A78tZg6rwXk+=Myk2N_vbneRYB7kV50x21Sc6U+7DjNVbw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [SQL] Table indexes in a SELECT with JOIN´s  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-sql
Let´s suppose that I have a SELECT statement that joins more than one table and such a statement is order by fields that belong not only to the table in the FROM but also by fields in the tables that are part of the JOIN´s. How does indexes should be considered in a case like this? For example:

SELECT artist_name, author_name, producer_name, song_name
FROM tbl_songs
INNER JOIN tbl_artists ON tbl_artists.artistid = tbl_songs_artistid
INNER JOIN tbl_authors ON tbl_authors.authorid = tbl_songs_authorid
INNER JOIN tbl_producers ON tbl_producers.producerid = tbl_songs_producerid
ORDER BY song_name

Respectfully,
Jorge Maldonado

В списке pgsql-sql по дате отправления:

Предыдущее
От: Marcin Krawczyk
Дата:
Сообщение: Re: ALTER USER abc PASSWORD - what's going on ???
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [SQL] Table indexes in a SELECT with JOIN´s