Querying Best Practices?
Just want to discuss query best practices.
And since I only need the nested relations
3 Replies
not sure about limit 1, it may not speed up in cetrain cases, but even make ot worse
for not selecting all columns - it will speed up a transfer time from database to a server
how can limit can it worst?
https://stackoverflow.com/questions/21385555/postgresql-query-very-slow-with-limit-1
https://www.postgresql.org/message-id/a8615d56-7e9d-8362-e61e-114fa92f1c02%40enterprisedb.com
a few links about this issue
but seems like when you are using limit 1 on a high cost queries, query planner thinks, that finding just 1 row will be fast enough to do it directly
without using any indexes/etc.