[support] Performance: is better a node_load or a direct SQL query ?

Pierre Rineau pierre.rineau at makina-corpus.com
Thu Jul 2 10:28:40 UTC 2009


node_load() should be better in most cases because it uses an internal
cache to make sure a node is never loaded twice.

This ensures no SQL query repetition, that are often the worst nightmare
for performance.

Pierre.

Le jeudi 02 juillet 2009 à 12:20 +0200, Michel Morelli a écrit :
> Hi all. I have a content type with 15+ fields. In some situations I need 
> to retrieve only 3 fields. 
> 
> So, is better (perfomance, security, portability, etc etc) a call to 
> node_load() function or a direct SQL query on the right table ?
> 
> M.
> 



More information about the support mailing list