Hi,
I understand that you have enabled the cache at server level and in Database level you have selected the checkbox “**Specify an existing data source as cache**” and specified the following:
> Database : denodo_training
> Data source : ds_historical_orders
After which you have enabled full cache mode for the view that has been created over the datasource ds_historical_orders. And your concern is that the view retrieves 0 rows when the cache mode is full.
In general, when you are using the same database for both source and cache, the “Direct Data Load” will happen. This new feature has been added to the Virtual DataPort’s Cache Engine to enhance the cache load query's performance by delegating statements similar to “INSERT INTO ... SELECT …” directly to the cache database. The Direct Data Load feature helps to transfer the data directly to the cache table in the cache database “without going through Denodo” when the cache data source is the same as the data source of the view(source). Because of this, you are getting the message "Total rows received: 0 (shown 0). No results returned because the cache was loaded by direct data load."
When you execute the view again with “**Retrieve all rows**” **selected**, and in the execution trace, you can see all the rows are retrieved from the cache. Besides, I would like to clarify that when the “Retrieve all rows” are **unchecked**, the number of rows being fetched from the cache database will be based on the "Display rows" parameter. By default, the “Display rows” are set to 150.
For further details on this, you can take a look at **[Using the VQL Shell](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/starting_virtual_dataport/launching_the_administration_tool/using_the_vql_shell)** section of the Virtual DataPort Administration Guide.
You could also refer to the **[Full Mode](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/cache_module/cache_modes/full_mode)** section of the Virtual DataPort Administration Guide for more details about the full cache.
Hope this helps!