ineffective inner join with more null values --------------------------------------------
Key: CORE-4531 URL: http://tracker.firebirdsql.org/browse/CORE-4531 Project: Firebird Core Issue Type: Improvement Components: Engine Affects Versions: 3.0 Alpha 2 Reporter: Alex Bekhtin select count(*) from MS2008_TABLES_FIELDS F1 inner join MS2008_TABLES_FIELDS F2 on F1.defname = F2.defname COUNT 76071 ------ Performance info ------ Prepare time = 0ms Execute time = 15s 538ms Avg fetch time = 15 538,00 ms Current memory = 557 312 224 Max memory = 557 647 744 Memory buffers = 32 768 Reads from disk to cache = 0 Writes from cache to disk = 0 Fetches from cache = 606 267 select count(*) from MS2008_TABLES_FIELDS F1 inner join MS2008_TABLES_FIELDS F2 on F1.defname = F2.defname where f1.defname is NOT NULL COUNT 76071 ------ Performance info ------ Prepare time = 15ms Execute time = 265ms Avg fetch time = 265,00 ms Current memory = 557 315 736 Max memory = 557 647 744 Memory buffers = 32 768 Reads from disk to cache = 0 Writes from cache to disk = 0 Fetches from cache = 257 217 -------------------------------------------------- CREATE TABLE MS2008_TABLES_FIELDS ( ... DEFNAME VARCHAR(128), ... ); CREATE INDEX MS2008_TABLES_FIELDS_IDX4 ON MS2008_TABLES_FIELDS (DEFNAME); select count(*) from MS2008_TABLES_FIELDS F1 --- COUNT 41682 select count(*) from MS2008_TABLES_FIELDS F1 where F1.defname is not null --- COUNT 6777 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel