[ckan-dev] Update datastore with primary key after creation.
Dominik Moritz
dominik.moritz at okfn.org
Fri Nov 22 19:44:37 UTC 2013
Hey,
it works for me [1]. However, it is very slow. You can create an index for some queries that you think are important (in your case you want an index on the id). On how to create an index, look at [2]. Keep in mind that datastore_create allows you to alter a table and indexes.
It sounds as though you might also want to extend the datastore api so that postgres can automatically increment the id. This would be some more work though but highly appreciated to go back into ckan core.
Cheers,
Dominik
[1] http://data.kk.dk/api/action/datastore_search?resource_id=01f9073e-e6b8-46bf-882f-9a4cd0a69a66&limit=5
[2] http://docs.ckan.org/en/latest/datastore.html#ckanext.datastore.logic.action.datastore_create
On 22 Nov 2013, at 00:35, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
> It’s for this dataset, which currently fails due to the number of rows (a bit over 27 mio):
> http://data.kk.dk/dataset/parkomat-transaktioner/resource/01f9073e-e6b8-46bf-882f-9a4cd0a69a66
>
> I have a middleware component which tries to get the max ID via API SQL for inserting new records realtime.
>
> CKAN fails to deliver the max ID due to timeout after 27 mio. rows…
>
> It also fails to show the preview L
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131122/ab235c84/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131122/ab235c84/attachment-0003.sig>
More information about the ckan-dev
mailing list