I have finally used it this is what I have done.
My Domains list was over 900 entries long and getting slow.
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 0;" > exwhite.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 1;" > exblack.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 2;" > regwhite.txt
pihole-FTL sqlite3 /etc/pihole/gravity.db "SELECT domain FROM domainlist WHERE enabled = 1 AND type = 3;" > regblack.txt