Re: [postgresql-it] query lenta

  • From: Roberto Marzialetti <roberto@xxxxxxxxxxxxxxx>
  • To: postgresql-it <postgresql-it@xxxxxxxxxxxxx>
  • Date: Mon, 22 Jan 2007 22:59:20 +0100

il giorno Monday, January 22, 2007, 10:36:06 PM
Tiziano Tissino <t.tissino@xxxxxxxxxxxxxxxx> a <postgresql-it@xxxxxxxxxxxxx>
ha scritto

I miei due cents...

ti ringrazio

per fare questo

        SELECT substr(ut__nome, 1, 1) || '. ' || ut__cogn AS fotografo, 
ftcodice, datins, ft___img, ftdescr2
        FROM adm_utenti
                INNER JOIN foto ON adm_utenti.utcodice = foto.ftcodute 
        ORDER BY foto.datins DESC

ci impiega 1,5 secondi...

se aggiungo questo

        GROUP BY ftcodice, fotografo, datins, ft___img, ftdescr2

2,5 sec :o(

grazie
Rob


Other related posts: