I have Student Table which has more than 15 million records, I am trying to export the data with the WiceGrid export CSV option, but it often timeouts.
What should I do to avoid timing out and giving me the CSV file correctly?
Controller Function
def index
@students_grid = initialize_grid(
current_school.students,
order: 'students.id',
order_direction: 'desc',
per_page: 100,
name: 'g1',
enable_export_to_csv: true,
csv_file_name: 'students-' + Time.current.to_s(:number)
)
export_grid_if_requested('g1' => 'students_grid') do
end
end
Aucun commentaire:
Enregistrer un commentaire