Vous n'êtes pas identifié(e).
Pages : 1
I have a postgreSql data base.
In this database i have two tables with the same Foreignkey (who is User)
so i have a table A (list of all user) and a table B (list of user i follow)
and i would like to filter the table A and also add a new colomn who tell me if the user is in the table B or not.
For the moment i do this in multiple task :
first i get the filter list of user in the table A
second i get the filter list of user in the table B
third i parse the table A and for each user i check if it is present or not in the table B
My question is : can i do this more efficiently ?? in one query for exemple ?
I hope i am clear enough
thank you in advance for your answer
I try to optimise my code If someone have an idea I'm all ears
Hors ligne
For the record it's a french speaking forum, if you don't speak french it would be better to rely on the usual community mailing lists such as pgsql-general.
Si vous parlez français, difficile de vous aider en l'état. Le mieux est de fournir un moyen de reproduire localement de 0, avec la/les requêtes que vous avez déjà, le résultat voulu et/ou les problèmes rencontrés, type plan d'exécution ou autre.
Julien.
https://rjuju.github.io/
Hors ligne
Pages : 1