Hirdetés
Új hozzászólás Aktív témák
-
Jester01
veterán
válasz
VladimirR
#305
üzenetére
delete from posts where topicid not in (<halmaz>)
Szerintem semmi baj nincs ezzel a megoldással. Gondolom a <halmaz> egy al-select, jelen esetben tehát valami ilyesmi lesz a parancs:
delete from posts where topicid not in (select topicid from topics)
Alternatív módszer:
delete from posts where not exists (select * from topics where topics.topicid = posts.topicid)
Az explain parancs által adott infók alapján nekem úgy tûnik, hogy az elsõ a gyorsabb. Ha van index a topics.topic_id mezõre, akkor azt mind a két verzió kihasználja.
Új hozzászólás Aktív témák
- LG OLED & OLED evo Televíziók: BLACK NOVEMBER -30%
- Nagyakkus, mobilnetes - Dell Latitude 5330 i3-1215U 6mag! 16GB 512GB 13.3" FHD 1 év gar
- BESZÁMÍTÁS! MSI H310M PRO i5 9600K 16GB DDR4 240GB SSD 2TB HDD RTX 2060 Super 8GB NZXT Source 600W
- 2db Apple Lightning - jack átalakító eladó egyben 1999 Ft
- GYÖNYÖRŰ iPhone 12 Pro 256GB Graphite -1 ÉV GARANCIA - Kártyafüggetlen, MS3281, 100% akkumulátor
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


