Document tags vs dataset tags

Hello,

I am wondering if anyone has any insight regarding the performance of document tags vs dataset tags. We have a scenario where we need to store results from a query in a tag. However, the structure of the result set from the query may differ across gateways. Looking to use a document tag for this but from my research it doesn't seem like document tags are very popular. What are the pros and cons of both?

Datasets are fundamentally two-dimensional, with fixed column types. This efficiently matches the standard SQL interface. If you are going to hold the result of a DB query, a Dataset is usually the right answer.

Documents are fundamentally unstructured, requiring a bit more metadata to hold the same content as a dataset, but are not limited to a flat, two-dimensional "array". Documents can hold arrays or dictionaries of arrays or dictionaries (...of arrays or dictionaries...) to any desired depth, or variable depth.