Slow Query:
===========

SELECT * FROM ( SELECT 
                            *, 
                            (arti_gercek_irs + arti_gercek_irs_karsifirma + arti_gercek_irs_karsifirma2 + arti_malfis + arti_malfis_depo- (eksi_gercek_irs + eksi_gercek_irs_karsifirma + eksi_gercek_irs_karsifirma2 + eksi_malfis + eksi_malfis_depo)) as gercek_stok,
                            (arti_fiili_irs + arti_fiili_irs_karsifirma + arti_fiili_irs_karsifirma2 + arti_malfis + arti_malfis_depo- (eksi_fiili_irs + eksi_fiili_irs_karsifirma + eksi_fiili_irs_karsifirma2 + eksi_malfis + eksi_malfis_depo)) as fiili_stok
                            
                            FROM
                            (SELECT 
                            
                            (SELECT kullaniciadi FROM sis_kullanici WHERE _key = stok._user) AS kullaniciadi,
                            (SELECT kod FROM sis_ozelkod WHERE _key = stok._key_sis_ozelkod1 ) AS ozelkod1,
                            (SELECT kod FROM sis_ozelkod WHERE _key = stok._key_sis_ozelkod2 ) AS ozelkod2,
                            (SELECT kod FROM scf_marka WHERE _key = stok._key_scf_marka) AS marka,
                            
                            (SELECT birimkod FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS birimadi,
                            
                            (SELECT scf_stokkart_birimleri._key FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS anabirimkey,
                            
                            (SELECT barkod FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS anabarkod,
                            
                            (SELECT fiyat1 FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS fiyat1,
                            
                            (SELECT sis_doviz.adi FROM scf_stokkart_birimleri, sis_stok_birim_listesi, sis_doviz
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                             AND scf_stokkart_birimleri._key_sis_doviz1 = sis_doviz._key
                            )AS doviz1,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_fiili_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_fiili_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as arti_fiili_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='2' OR malfis.turu='5' OR malfis.turu='6')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as arti_malfis,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='1')
                             AND ( malfis._key_sis_depo_dest = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as arti_malfis_depo,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_fiili_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_fiili_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as eksi_fiili_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='3' OR malfis.turu='4' OR malfis.turu='7')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as eksi_malfis,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='1')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as eksi_malfis_depo,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_gercek_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_gercek_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as arti_gercek_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_gercek_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as eksi_gercek_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_gercek_irs, 
                            
                            COALESCE((SELECT asgarimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as asgarimiktar,
                            
                            COALESCE((SELECT guvenlimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as guvenlimiktar,
                            
                            COALESCE((SELECT azamimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as azamimiktar,                
                            
                            stok.* 
                            FROM scf_stokkart stok
                            ) as stk
                        ) AS _SWT WHERE  UPPER(durum) = UPPER('A') ORDER BY UPPER(stokkartkodu) desc LIMIT 50

Analyze Output
==============
Limit  (cost=142623.12..142623.18 rows=25 width=503) (actual time=19768.974..19769.366 rows=50 loops=1)
  ->  Sort  (cost=142623.12..142623.18 rows=25 width=503) (actual time=19768.955..19769.152 rows=50 loops=1)
        Sort Key: upper((stok.stokkartkodu)::text)
        ->  Seq Scan on scf_stokkart stok  (cost=0.00..142622.54 rows=25 width=503) (actual time=4.726..19324.633 rows=4947 loops=1)
              Filter: (upper((durum)::text) = 'A'::text)
              SubPlan
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.044..0.046 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.034..0.034 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.029..0.029 rows=0 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.028..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.012 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.066..0.068 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.036..0.055 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.014..0.015 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.022..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.014 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.015..0.017 rows=1 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.060..0.062 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.038..0.051 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.011..0.018 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.301..0.303 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.288..0.290 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.011..0.071 rows=14 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.009 rows=1 loops=69258)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.041..0.043 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.027..0.031 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.012 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.011..0.013 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.059..0.061 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.045..0.049 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.018 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.036..0.038 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.026..0.027 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.014 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.061..0.063 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.038..0.051 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.011..0.018 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.044..0.046 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.033..0.033 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.029..0.029 rows=0 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.012 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.064..0.066 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.035..0.054 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.013..0.015 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.023..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.015 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.017 rows=1 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.061..0.063 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.039..0.052 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.011..0.018 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.302..0.305 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.290..0.292 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.012..0.072 rows=14 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.009 rows=1 loops=69258)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.043..0.045 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.028..0.033 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.013 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.012..0.014 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.059..0.061 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.045..0.050 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.011..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.036..0.038 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.026..0.027 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.014 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.064..0.066 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.039..0.053 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.019 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=4947)
                      Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
                ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=4947)
                      Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
                ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=4947)
                      Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.059..0.061 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.037..0.050 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.065..0.067 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.036..0.054 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.014..0.015 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.023..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.015 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.017 rows=1 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.058..0.060 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.044..0.049 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.036..0.038 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.026..0.027 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.014 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.061..0.063 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.037..0.051 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.044..0.046 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.033..0.033 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.028..0.028 rows=0 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.028..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.009..0.012 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.065..0.067 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.036..0.055 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.014..0.015 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.023..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.014 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.015..0.018 rows=1 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.062..0.064 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.039..0.051 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.011..0.018 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.012..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.302..0.304 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.289..0.291 rows=0 loops=4947)
                            Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                            ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.012..0.074 rows=14 loops=4947)
                                  Index Cond: (turu = 1::smallint)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.009 rows=1 loops=69258)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.048..0.050 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.033..0.038 rows=0 loops=4947)
                            ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.014..0.016 rows=1 loops=4947)
                                  Index Cond: (_key_scf_stokkart = $4)
                                  Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                            ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.015..0.017 rows=0 loops=2639)
                                  Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                                  Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.058..0.060 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.044..0.049 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.010..0.017 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.027..0.028 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.012..0.015 rows=0 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.018..0.018 rows=0 loops=1081)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.081..0.083 rows=1 loops=4947)
                      ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.053..0.070 rows=0 loops=4947)
                            ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.018..0.029 rows=1 loops=4947)
                                  Index Cond: (_key_kalemturu = $4)
                                  Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                            ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.018..0.019 rows=0 loops=6434)
                                  Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                                  Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
                ->  Nested Loop  (cost=0.00..95.11 rows=1 width=42) (actual time=0.056..0.140 rows=1 loops=4947)
                      Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                      ->  Nested Loop  (cost=0.00..93.81 rows=1 width=50) (actual time=0.034..0.057 rows=1 loops=4947)
                            Join Filter: ("outer"._key_sis_doviz1 = "inner"._key)
                            ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=16) (actual time=0.011..0.014 rows=1 loops=4947)
                                  Index Cond: ($4 = _key_scf_stokkart)
                                  Filter: (anabirim = '1'::bpchar)
                            ->  Seq Scan on sis_doviz  (cost=0.00..1.03 rows=3 width=50) (actual time=0.005..0.013 rows=3 loops=4947)
                      ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.036 rows=13 loops=4947)
                ->  Nested Loop  (cost=0.00..94.04 rows=1 width=16) (actual time=0.034..0.101 rows=1 loops=4947)
                      Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                      ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=24) (actual time=0.011..0.014 rows=1 loops=4947)
                            Index Cond: ($4 = _key_scf_stokkart)
                            Filter: (anabirim = '1'::bpchar)
                      ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.035 rows=13 loops=4947)
                ->  Nested Loop  (cost=0.00..94.04 rows=1 width=42) (actual time=0.035..0.102 rows=1 loops=4947)
                      Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                      ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=50) (actual time=0.012..0.015 rows=1 loops=4947)
                            Index Cond: ($4 = _key_scf_stokkart)
                            Filter: (anabirim = '1'::bpchar)
                      ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.036 rows=13 loops=4947)
                ->  Nested Loop  (cost=0.00..94.04 rows=1 width=8) (actual time=0.035..0.102 rows=1 loops=4947)
                      Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                      ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=16) (actual time=0.012..0.015 rows=1 loops=4947)
                            Index Cond: ($4 = _key_scf_stokkart)
                            Filter: (anabirim = '1'::bpchar)
                      ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.003..0.036 rows=13 loops=4947)
                ->  Nested Loop  (cost=0.00..94.04 rows=1 width=28) (actual time=0.052..0.120 rows=1 loops=4947)
                      Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                      ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=8) (actual time=0.024..0.027 rows=1 loops=4947)
                            Index Cond: ($4 = _key_scf_stokkart)
                            Filter: (anabirim = '1'::bpchar)
                      ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=36) (actual time=0.005..0.039 rows=13 loops=4947)
                ->  Seq Scan on scf_marka  (cost=0.00..1.85 rows=1 width=42) (actual time=0.018..0.061 rows=1 loops=4947)
                      Filter: (_key = $3)
                ->  Index Scan using sis_ozelkod_pkey on sis_ozelkod  (cost=0.00..5.75 rows=1 width=66) (actual time=0.014..0.018 rows=1 loops=4947)
                      Index Cond: (_key = $2)
                ->  Index Scan using sis_ozelkod_pkey on sis_ozelkod  (cost=0.00..5.75 rows=1 width=66) (actual time=0.012..0.012 rows=0 loops=4947)
                      Index Cond: (_key = $1)
                ->  Seq Scan on sis_kullanici  (cost=0.00..1.27 rows=1 width=42) (actual time=0.017..0.032 rows=1 loops=4947)
                      Filter: (_key = $0)
Total runtime: 19781.190 ms


Faster Version: (only added "fiili_stok > -1000000" case)
===============
SELECT * FROM ( SELECT 
                            *, 
                            (arti_gercek_irs + arti_gercek_irs_karsifirma + arti_gercek_irs_karsifirma2 + arti_malfis + arti_malfis_depo- (eksi_gercek_irs + eksi_gercek_irs_karsifirma + eksi_gercek_irs_karsifirma2 + eksi_malfis + eksi_malfis_depo)) as gercek_stok,
                            (arti_fiili_irs + arti_fiili_irs_karsifirma + arti_fiili_irs_karsifirma2 + arti_malfis + arti_malfis_depo- (eksi_fiili_irs + eksi_fiili_irs_karsifirma + eksi_fiili_irs_karsifirma2 + eksi_malfis + eksi_malfis_depo)) as fiili_stok
                            
                            FROM
                            (SELECT 
                            
                            (SELECT kullaniciadi FROM sis_kullanici WHERE _key = stok._user) AS kullaniciadi,
                            (SELECT kod FROM sis_ozelkod WHERE _key = stok._key_sis_ozelkod1 ) AS ozelkod1,
                            (SELECT kod FROM sis_ozelkod WHERE _key = stok._key_sis_ozelkod2 ) AS ozelkod2,
                            (SELECT kod FROM scf_marka WHERE _key = stok._key_scf_marka) AS marka,
                            
                            (SELECT birimkod FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS birimadi,
                            
                            (SELECT scf_stokkart_birimleri._key FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS anabirimkey,
                            
                            (SELECT barkod FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS anabarkod,
                            
                            (SELECT fiyat1 FROM scf_stokkart_birimleri, sis_stok_birim_listesi
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                            )AS fiyat1,
                            
                            (SELECT sis_doviz.adi FROM scf_stokkart_birimleri, sis_stok_birim_listesi, sis_doviz
                             WHERE scf_stokkart_birimleri._key_sis_stok_birim_listesi = sis_stok_birim_listesi._key 
                             AND stok._key = scf_stokkart_birimleri._key_scf_stokkart
                             AND scf_stokkart_birimleri.anabirim = '1'
                             AND scf_stokkart_birimleri._key_sis_doviz1 = sis_doviz._key
                            )AS doviz1,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_fiili_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_fiili_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as arti_fiili_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='2' OR malfis.turu='5' OR malfis.turu='6')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as arti_malfis,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='1')
                             AND ( malfis._key_sis_depo_dest = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as arti_malfis_depo,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_fiili_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='4' OR irs.turu='7' OR irs.turu='8' OR irs.turu='11')
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_fiili_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='9' OR irs.turu='2' OR irs.turu='3' OR irs.turu='5')
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as eksi_fiili_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='3' OR malfis.turu='4' OR malfis.turu='7')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as eksi_malfis,
                            
                            (SELECT COALESCE (sum(malfiskal.anamiktar), 0) FROM scf_malzeme_fisi malfis, scf_malzeme_fisi_kalemi malfiskal
                             WHERE malfiskal._key_scf_stokkart = stok._key
                             AND malfiskal._key_scf_malzeme_fisi = malfis._key
                             AND (malfis.turu='1')
                             AND ( malfis._key_sis_depo = '9187061764867813887' )
                             AND (((malfiskal._key >> 48) = 257 OR (malfiskal._key >> 48) = 514 OR (malfiskal._key >> 48) = 1539 OR (malfiskal._key >> 48) = 1796 OR (malfiskal._key >> 48) = 2053 OR (malfiskal._key >> 48) = 2310 OR (malfiskal._key >> 56) = 127))
                             AND malfis.tarih <= '2006-01-18'
                            ) as eksi_malfis_depo,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_gercek_irs,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as arti_gercek_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as arti_gercek_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='1' OR irs.turu='7' OR irs.turu='8' OR (irs.turu='4' AND irs._key_scf_fatura != 0) OR (irs.turu='11' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_dest = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_gercek_irs_karsifirma,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'K'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                             -- Sadece aynı firmalar arası irsaliyelerde hesaplanıyor
                             AND (irs._key >> 56) = irs._key_sis_firma_dest
                            ) as eksi_gercek_irs_karsifirma2,
                            
                            (SELECT COALESCE (sum(irskal.anamiktar), 0) FROM scf_irsaliye irs, scf_irsaliye_kalemi irskal
                             WHERE irskal._key_kalemturu = stok._key
                             AND irskal._key_scf_irsaliye = irs._key
                             AND irs.karsifirma = 'C'
                             AND (irs.turu='6' OR irs.turu='2' OR irs.turu='3' OR (irs.turu='9' AND irs._key_scf_fatura != 0) OR (irs.turu='5' AND irs._key_scf_fatura != 0))
                             AND ( irskal._key_sis_depo_source = '9187061764867813887' )
                             AND (((irskal._key >> 48) = 257 OR (irskal._key >> 48) = 514 OR (irskal._key >> 48) = 1539 OR (irskal._key >> 48) = 1796 OR (irskal._key >> 48) = 2053 OR (irskal._key >> 48) = 2310 OR (irskal._key >> 56) = 127))
                             AND irs.iptal = '-'
                             AND irs.tarih <= '2006-01-18'
                            ) as eksi_gercek_irs, 
                            
                            COALESCE((SELECT asgarimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as asgarimiktar,
                            
                            COALESCE((SELECT guvenlimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as guvenlimiktar,
                            
                            COALESCE((SELECT azamimiktar FROM scf_depo_parametresi dp 
                            WHERE stok._key = dp._key_scf_stokkart AND dp._key_sis_depo_filtre = '0'), 0) as azamimiktar,                
                            
                            stok.* 
                            FROM scf_stokkart stok
                            ) as stk
                        ) AS _SWT WHERE  UPPER(durum) = UPPER('A') AND fiili_stok > -1000000 ORDER BY UPPER(stokkartkodu) desc LIMIT 50 

Analyze Output:
===============
Limit  (cost=0.00..6835563.00 rows=9 width=503) (actual time=3.910..207.557 rows=50 loops=1)
  ->  Index Scan Backward using scf_stokkart_stokkartkodu_idx on scf_stokkart stok  (cost=0.00..6835563.00 rows=9 width=503) (actual time=3.904..207.269 rows=50 loops=1)
        Filter: ((upper((durum)::text) = 'A'::text) AND (((((((subplan) + (subplan)) + (subplan)) + (subplan)) + (subplan)) - (((((subplan) + (subplan)) + (subplan)) + (subplan)) + (subplan))) > -10000000::numeric))
        SubPlan
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.043..0.045 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.032..0.032 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.028..0.028 rows=0 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.031..0.033 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.022..0.022 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.009..0.010 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.039..0.041 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.030..0.030 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.014..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.033..0.035 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.024..0.024 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.021..0.022 rows=0 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.029..0.030 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.274..0.276 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.263..0.263 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.011..0.071 rows=14 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.008 rows=0 loops=700)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.026..0.026 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.011..0.012 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.020..0.020 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.039..0.041 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.030..0.030 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.025..0.026 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.032..0.034 rows=1 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.054..0.056 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.040..0.044 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.020..0.022 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.033..0.034 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.043..0.045 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.032..0.032 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.027..0.027 rows=0 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.031..0.033 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.023..0.023 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.011 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.024..0.024 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.021..0.022 rows=0 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.029..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.269..0.271 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.259..0.259 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.011..0.070 rows=14 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=700)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.025..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.010 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.039..0.041 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.031..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.033..0.035 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.024..0.024 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.021..0.024 rows=1 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.041..0.043 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.028..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.015..0.017 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.043..0.045 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.032..0.032 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.028..0.028 rows=0 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.031..0.033 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.022..0.022 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.010 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.021..0.022 rows=0 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.042..0.044 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.031..0.032 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.016..0.017 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.268..0.270 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.257..0.257 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.011..0.071 rows=14 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=700)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.032..0.034 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.024..0.024 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.010..0.011 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.014..0.014 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.021..0.023 rows=1 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.041..0.043 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.029..0.032 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.016 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.016..0.017 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=50)
                Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
          ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=50)
                Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
          ->  Seq Scan on scf_depo_parametresi dp  (cost=0.00..0.00 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=50)
                Filter: (($4 = _key_scf_stokkart) AND (_key_sis_depo_filtre = 0::bigint))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.039..0.041 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.028..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.016 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.031..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.023..0.024 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.036..0.038 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.022..0.023 rows=0 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.63..187.63 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.029..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.016 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.021..0.024 rows=1 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR ((turu = 9::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 5::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.028..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.016..0.017 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR ((turu = 4::smallint) AND (_key_scf_fatura <> 0)) OR ((turu = 11::smallint) AND (_key_scf_fatura <> 0))) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.044..0.045 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.033..0.033 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.029..0.029 rows=0 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (never executed)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.022..0.022 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.009..0.010 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 3::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.038..0.040 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.028..0.029 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.024..0.024 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.021..0.022 rows=0 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.040..0.042 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.030..0.031 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=58.90..58.90 rows=1 width=16) (actual time=0.268..0.270 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.89 rows=1 width=16) (actual time=0.258..0.258 rows=0 loops=50)
                      Join Filter: ("inner"._key_scf_malzeme_fisi = "outer"._key)
                      ->  Index Scan using scf_malzeme_fisi_turu_idx on scf_malzeme_fisi malfis  (cost=0.00..5.57 rows=1 width=8) (actual time=0.011..0.072 rows=14 loops=50)
                            Index Cond: (turu = 1::smallint)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.007..0.007 rows=0 loops=700)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
          ->  Aggregate  (cost=58.91..58.91 rows=1 width=16) (actual time=0.035..0.037 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..58.90 rows=1 width=16) (actual time=0.023..0.023 rows=0 loops=50)
                      ->  Index Scan using scf_malzeme_fisi_kalemi_key_scf_stokkart_idx on scf_malzeme_fisi_kalemi malfiskal  (cost=0.00..53.31 rows=1 width=24) (actual time=0.011..0.011 rows=0 loops=50)
                            Index Cond: (_key_scf_stokkart = $4)
                            Filter: (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127))
                      ->  Index Scan using scf_malzeme_fisi_pkey on scf_malzeme_fisi malfis  (cost=0.00..5.58 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=12)
                            Index Cond: ("outer"._key_scf_malzeme_fisi = malfis._key)
                            Filter: (((turu = 2::smallint) OR (turu = 5::smallint) OR (turu = 6::smallint)) AND (_key_sis_depo = 9187061764867813887::bigint) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.037..0.039 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.62 rows=1 width=16) (actual time=0.028..0.028 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.013..0.015 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.03 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date) AND ((_key >> 56) = _key_sis_firma_dest))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.034..0.036 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.014..0.014 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_dest = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.024..0.026 rows=1 loops=4)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'K'::bpchar) AND ((turu = 6::smallint) OR (turu = 9::smallint) OR (turu = 2::smallint) OR (turu = 3::smallint) OR (turu = 5::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Aggregate  (cost=187.62..187.62 rows=1 width=16) (actual time=0.043..0.045 rows=1 loops=50)
                ->  Nested Loop  (cost=0.00..187.61 rows=1 width=16) (actual time=0.030..0.033 rows=0 loops=50)
                      ->  Index Scan using scf_irsaliye_kalemi_key_kalemturu_idx on scf_irsaliye_kalemi irskal  (cost=0.00..181.58 rows=1 width=24) (actual time=0.016..0.017 rows=0 loops=50)
                            Index Cond: (_key_kalemturu = $4)
                            Filter: ((_key_sis_depo_source = 9187061764867813887::bigint) AND (((_key >> 48) = 257) OR ((_key >> 48) = 514) OR ((_key >> 48) = 1539) OR ((_key >> 48) = 1796) OR ((_key >> 48) = 2053) OR ((_key >> 48) = 2310) OR ((_key >> 56) = 127)))
                      ->  Index Scan using scf_irsaliye_pkey on scf_irsaliye irs  (cost=0.00..6.02 rows=1 width=8) (actual time=0.017..0.019 rows=0 loops=15)
                            Index Cond: ("outer"._key_scf_irsaliye = irs._key)
                            Filter: ((karsifirma = 'C'::bpchar) AND ((turu = 1::smallint) OR (turu = 4::smallint) OR (turu = 7::smallint) OR (turu = 8::smallint) OR (turu = 11::smallint)) AND (iptal = '-'::bpchar) AND (tarih <= '2006-01-18'::date))
          ->  Nested Loop  (cost=0.00..95.11 rows=1 width=42) (actual time=0.068..0.143 rows=1 loops=50)
                Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                ->  Nested Loop  (cost=0.00..93.81 rows=1 width=50) (actual time=0.036..0.058 rows=1 loops=50)
                      Join Filter: ("outer"._key_sis_doviz1 = "inner"._key)
                      ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=16) (actual time=0.012..0.015 rows=1 loops=50)
                            Index Cond: ($4 = _key_scf_stokkart)
                            Filter: (anabirim = '1'::bpchar)
                      ->  Seq Scan on sis_doviz  (cost=0.00..1.03 rows=3 width=50) (actual time=0.005..0.013 rows=3 loops=50)
                ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.036 rows=13 loops=50)
          ->  Nested Loop  (cost=0.00..94.04 rows=1 width=16) (actual time=0.050..0.105 rows=1 loops=50)
                Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=24) (actual time=0.011..0.014 rows=1 loops=50)
                      Index Cond: ($4 = _key_scf_stokkart)
                      Filter: (anabirim = '1'::bpchar)
                ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.037 rows=13 loops=50)
          ->  Nested Loop  (cost=0.00..94.04 rows=1 width=42) (actual time=0.046..0.099 rows=1 loops=50)
                Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=50) (actual time=0.011..0.014 rows=1 loops=50)
                      Index Cond: ($4 = _key_scf_stokkart)
                      Filter: (anabirim = '1'::bpchar)
                ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.003..0.034 rows=13 loops=50)
          ->  Nested Loop  (cost=0.00..94.04 rows=1 width=8) (actual time=0.047..0.106 rows=1 loops=50)
                Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=16) (actual time=0.012..0.015 rows=1 loops=50)
                      Index Cond: ($4 = _key_scf_stokkart)
                      Filter: (anabirim = '1'::bpchar)
                ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=8) (actual time=0.004..0.040 rows=13 loops=50)
          ->  Nested Loop  (cost=0.00..94.04 rows=1 width=28) (actual time=0.068..0.124 rows=1 loops=50)
                Join Filter: ("outer"._key_sis_stok_birim_listesi = "inner"._key)
                ->  Index Scan using scf_stokkart_birimleri_key_scf_stokkart_idx on scf_stokkart_birimleri  (cost=0.00..92.75 rows=1 width=8) (actual time=0.027..0.030 rows=1 loops=50)
                      Index Cond: ($4 = _key_scf_stokkart)
                      Filter: (anabirim = '1'::bpchar)
                ->  Seq Scan on sis_stok_birim_listesi  (cost=0.00..1.13 rows=13 width=36) (actual time=0.006..0.039 rows=13 loops=50)
          ->  Seq Scan on scf_marka  (cost=0.00..1.85 rows=1 width=42) (actual time=0.030..0.061 rows=1 loops=50)
                Filter: (_key = $3)
          ->  Index Scan using sis_ozelkod_pkey on sis_ozelkod  (cost=0.00..5.75 rows=1 width=66) (actual time=0.015..0.018 rows=1 loops=50)
                Index Cond: (_key = $2)
          ->  Index Scan using sis_ozelkod_pkey on sis_ozelkod  (cost=0.00..5.75 rows=1 width=66) (actual time=0.011..0.011 rows=0 loops=50)
                Index Cond: (_key = $1)
          ->  Seq Scan on sis_kullanici  (cost=0.00..1.27 rows=1 width=42) (actual time=0.013..0.032 rows=1 loops=50)
                Filter: (_key = $0)
Total runtime: 219.156 ms



