Hi Maik,

Raw SQL would certainly be the most efficient way.  Even if you didn't use
raw SQL, though, how were you planning on dealing with Cayenne's caches?  I
think this issue would, regardless of how you truncated the table.  There
are various options, I'm just trying to get a feel for your use can and
thoughts.

Thanks,

mrg


On Thu, Dec 21, 2017 at 5:10 AM, Musall, Maik <m...@selbstdenker.ag> wrote:

> Hi,
>
> I have a lookup table with >400k rows that I want to periodically refill
> from external sources. Since it also contains precomputed values that are
> not part of the external source, my plan is to read the external data and
> batch-insert it all into the table.
>
> How can I truncate the entire table to prepare it for new inserts? The
> only thing that comes to mind is raw SQL, but that would obviously leave
> stale data in Cayenne's various caches.
>
> Thanks
> Maik
>
>

Reply via email to