Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traslatedQuery Execution Time Issue #200

Open
superphonic opened this issue Nov 21, 2013 · 0 comments
Open

traslatedQuery Execution Time Issue #200

superphonic opened this issue Nov 21, 2013 · 0 comments

Comments

@superphonic
Copy link

Doesn't look like these issues are actively being looked at any more, but I'll log my problem in case someone has any idea.

I have an MSSQL Database and am using translated queries.

When I run the following query:

$result = $db->translatedQuery("SELECT * FROM industries LIMIT 5");

This is the is the execution time

437.34908103943 milliseconds
0.43734908103943 seconds

Takes a loooooong time as you can see...

When I directly connect to the database using PDO and run the query below:

$sql = "SELECT TOP 5 *, CAST(\"industries\".\"industry\" AS VARBINARY(MAX)) AS fmssqln__industry FROM industries";
$sth = $conn->query($sql);

This is the execution time:

85.041999816895 milliseconds
0.085041999816895 seconds

Much quicker.

The SQL I used for the second query is the translated query that was spat out by the translatedQuery() function in the first step so the actual query is identical.

My question is - what is the translated query function doing to take this long. If I have 3 or 4 translated queries on one page it takes 2 to 4 seconds for the page to load !?!?!

How do I speed up the translated query function? It is too slow to be usable in it's current form.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant