After investigating further I've found out that the id's aren't actually missing, but that my query just isn't loading all rows.
I'm pulling data from system-DSN into PowerQuery with the following query:
= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message")
Eventough I cleary select all, it's not loading all the rows.
With the above query I get only 4592 rows with highest id = 7081
However, when I change the query to:
= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message WHERE [id] > 10000")
I get 4861 different rows with lowest id = 10010 and highest id = 15825
= Odbc.Query("dsn=PEO-OdooLive", "SELECT * FROM mail_message WHERE [id] > 7081 and <= 10000")
I get 1579 different rows with lowest id = 7082 and highest id = 10000
I'm really puzzled as to why this is happening and the only solution I can think of is to split my query into id-ranges, but since the highest id I've found is 261145 and I get about 4500-5000 rows with one query, it would be quite a hassle and not a sustainable solution, since the table will keep growing.
Does anybody have an idea to what might be causing this?