-- SELECT count(*) FROM EXT_TITEL_INFO
-- SELECT * FROM EXT_TITEL_INFO
set timing on

SELECT count(*) FROM EXT_BEDPBED;

-- PROMPT No Hashing allowed...
-- SELECT /*+ NO_USE_HASH(bedp t_info) */
-- bedp.BEDARFNR,
-- bedp.BEDP_SEQUENZ,
-- bedp.BEDP_TITELNR,
-- bedp.BEDP_MAN,
-- bedp.BEDP_MENGE_BEDARF_VM,
-- t_info.MELDENUMMER,
-- t_info.MENGE_VORMERKER
-- FROM EXT_BEDPBED bedp
-- LEFT JOIN EXT_TITEL_INFO t_info
--     ON bedp.BEDP_TITELNR = t_info.TI_NUMMER
--     AND bedp.BEDP_MAN = t_info.MANDFUEHR;
-- PROMPT ####################################

-- PROMPT All allowed
-- SELECT
-- bedp.BEDARFNR,
-- bedp.BEDP_SEQUENZ,
-- bedp.BEDP_TITELNR,
-- bedp.BEDP_MAN,
-- bedp.BEDP_MENGE_BEDARF_VM,
-- t_info.MELDENUMMER,
-- t_info.MENGE_VORMERKER
-- FROM EXT_BEDPBED bedp
-- LEFT JOIN EXT_TITEL_INFO t_info
--     ON bedp.BEDP_TITELNR = t_info.TI_NUMMER
--     AND bedp.BEDP_MAN = t_info.MANDFUEHR;
-- -- WHERE bedp.BEDP_MAN IN (1, 90) AND t_info.MELDENUMMER != 26;
-- PROMPT ######################################

-- SELECT * FROM EXT_TITEL_INFO t_info WHERE t_info.TI_NUMMER = 6132326;
SELECT * FROM EXT_TITEL_INFO t_info WHERE t_info.TI_NUMMER = 4591588;
