|
|
Choosing A Webhost: |
Re: langsame "NOT IN" Subquery: msg#00046db.postgresql.german
Hallo Thomas, Steubesand, Thomas <T.Steubesand@xxxxxxxxxxxxxx> wrote: > Es sollen ALLE Datensätze aus table1 herausgefunden werden, > die KEINEN entsprechenden Datensatz in der table2 haben: versuch mal: SELECT table1.id, ... FROM table1 LEFT OUTER JOIN table2 ON table1.id = table2.t1_id WHERE table2.t1_id IS NULL ; wenn es in t2.t1_id IDs mehrfach gibt, ist evt. schneller erst noch mal zu deduplizieren, die tatsächlich gejointen Records werden aber eh wieder verworfen... Gruß Tobias ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: langsame "NOT IN" Subquery, A. Kretschmer |
|---|---|
| Next by Date: | Re: Komplette Datenbank auf anderen Rechner (Msg-ID: <469DEB51.2090405@xxxxxxxxxxxxx>), Oliver Baer |
| Previous by Thread: | Re: langsame "NOT IN" Subquery, A. Kretschmer |
| Next by Thread: | Re: langsame "NOT IN" Subquery, Rolf Schaufelberger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |