large database
large database
I have a large table so I need server side process if not it takes a lot time to load the data, but with server side I lost my filters.
Is there any way to use client side but not load the whole table??? How can I tell datatables that just load a part of the table??
For instance, if the table has a date field we may set datatables to load only the last year or so
Thanks
Is there any way to use client side but not load the whole table??? How can I tell datatables that just load a part of the table??
For instance, if the table has a date field we may set datatables to load only the last year or so
Thanks
This discussion has been closed.
Replies
I have 9000 row!!. It does not seems to be that big?
What can be causing the enormous delay??
Until then, as I say, I think a custom query would be needed. As you say, 9000 rows is not that many - server-side processing should be able to cope with millions!
Allan
Thanks again
https://editor.datatables.net/docs/current/php/class-DataTables.Database.html#_sql
Regards,
Allan
I did just this in the php file...there is no error but the data do not show in datatable
$out = $db ->query ('select')
->table ('factprove')
->get ('fecha, numero' )
->order ('fecha desc')
->exec()
->fetchAll();
echo json_encode( $out );
Allan
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 35 bytes)
So there is still a problem with the number of rows, even using sql
Now I have a large amount of rows (1000 equal to the limit) on screen, not only the ten that should appear.
I do remember it happened to me, but I could not find your previous answer. May be if I solve this I can take off the limit (what do you think?
I am sorry for asking two times the same question !!!
Thanks again
ini_set( "memory_limit", "500M" ) ;
16777216 bytes isn't a lot.
You might want to try estimating how much RAM you will needed based on the contents of your tables. Perhaps try doubling the value until it works and see if that is acceptable. Having said that, the Editor libraries, as we know, are not massively efficient for joins. As I've mentioned, this is something I plan to work on, but I'm afraid I've not yet had a chance to do so.
Allan
Good point :-) I just took the first example I found in my development version. Should have thought a bit more!