Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1782 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

hi guys please help in this situation:

Scenario: I want to retrieve the records of a database having 90,000 records via PHP, but unable to do it.

How can i retrieve the complete records without any performance issue ?

I am using the code:

<?php

$layout='web';

$fetchLayout=$fm->newFindAllCommand($layout);

print_r($result=$fetchLayout->execute());

$values=$result->getRecords();

foreach($values as $recValues)

{

echo $test = $recValues->getField('make');

echo $instructorlist1=$recValues->getField('model');

echo $instructorlist2=$recValues->getField('year');

}

?>

Posted

Reduce the number of fields on the layout to only those you need for that specific query.

Do you know the max memory that PHP can use, on your server? I'm not sure if you're reaching this limit, but that's the only other thing I can think of.

Posted

Thanks for concern.

Table consists of 53 fields, but i am only using 2 fields which is needed.

Although, it is slow.

Posted

Depending on how much data is in the two fields on the special layout that has only those two fields... It still may be too much data to handle in one hit...

Is there a reason you need all 90K rows at once?

Posted

Depending on how much data is in the two fields on the special layout that has only those two fields... It still may be too much data to handle in one hit...

Is there a reason you need all 90K rows at once?

I want to create a value list from the field, which has 90k records.

Posted

How many values are unique?

I'd probably create a value list in FileMaker and then call that - not sure how that's done in the API but it's fairly easy in FX.php

  • 7 years later...
Posted

If ExecuteSQL is available in your version of PHP, use PerformFMScript instead, and call ExecuteSQL, delivering the results in a flat table format.  This is much faster and more efficient than using the API to get the individual records, as each record will include metadata and bloat the overall return.

You can use a layout with one field on it (a global text field) to save and output the results for your PHP file to read.

This topic is 1782 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.