Solved Query runs slow with NOT IN

I read today that all its answers are based on compilations of web data from 2021.
It seems anything written before or since is ignored in its responses

Also, OpenAI is about to launch a trial paid service for ChatGPT in the US with priority access to the servers and to new features
No doubt other countries will get similar paid services in the near future.
 
Hi!

Conclusion: Measurements apply to specific constellations.
That's important.

An example where not exists is faster than join:
SQL:
select count(*) as Cnt from Table1 as T1 where not exists (select 1 from Table2A as T2 where T2.fiTab1 = T1.id)
vs.
SQL:
select count(*) as Cnt from Table1 as T1 left join Table2A as T2 ON T2.fiTab1 = T1.id where T2.fiTab1 is null

Results:
4 records in Table2 for each record in Table1: not exists: ~10 ms, join: ~20 ms
256 records in Table2 for each record in Table1: not exists: ~12 ms, join: ~500 ms

test file: (can't link to URL ... 'This is likely because your content is spam-like or contains inappropriate elements.')
GitHub: /josef-poetzl/access-examples/blob/main/data/ExistsVsJoin.zip

Josef
 
Last edited:
I read today that all its answers are based on compilations of web data from 2021.
It seems anything written before or since is ignored in its responses

Also, OpenAI is about to launch a trial paid service for ChatGPT in the US with priority access to the servers and to new features
No doubt other countries will get similar paid services in the near future.
It was 'refreshed' Autumn/Winter last year so it at least knows Biden is president now. Back in July it swore blind Trump was president. OpenAI says today's date is 6th March 2021. I couldn't get on to ChatGPT just now but it's probably the same dataset. In an attempt to alleviate my disappointment it said it was busy teaching the AI how to make coffee. I'm now more disappointed that it couldn't reference Hitchhiker's Guide correctly.
 
Perhaps in July it was quoting “alternative truths” as Kelly Anne Conway once said
 

Users who are viewing this thread

Back
Top Bottom