# Can we use Elastic SQL for Production version project in PHP?

**URL:** <https://discuss.elastic.co/t/can-we-use-elastic-sql-for-production-version-project-in-php/188316>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [July 1, 2019, 12:42pm UTC](https://discuss.elastic.co/t/can-we-use-elastic-sql-for-production-version-project-in-php/188316 "2019-07-01T12:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jignesh.panchal](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jignesh.panchal](https://discuss.elastic.co/u/jignesh.panchal)\
**Post date:** [July 1, 2019, 12:42pm UTC](https://discuss.elastic.co/t/can-we-use-elastic-sql-for-production-version-project-in-php/188316/1 "2019-07-01T12:42:25Z")

</div>

For Example  
GET \_sql  
{  
"query": "select \* from index limit 10"  
}

Can we use Elastic SQL for Production version project in PHP?  
If yes then how to use using PHP?

If SQL is available in ELastic than I dont want to use JSON base query, Is it ok for large data project?  
If there any chance to performance issue with this?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 1, 2019, 12:57pm UTC](https://discuss.elastic.co/t/can-we-use-elastic-sql-for-production-version-project-in-php/188316/2 "2019-07-01T12:57:44Z")

</div>

> [@jignesh.panchal](#):
>
> Can we use Elastic SQL for Production version project in PHP?

yes.

> [@jignesh.panchal](#):
>
> If yes then how to use using PHP?

I don't know (not a PHP dev here) but you can probably call the `_sql` Rest endpoint in the same way you'd call whatever endpoint from PHP code...

> [@jignesh.panchal](#):
>
> I dont want to use JSON base query

I'd although use it but it's up to you.

> If there any chance to performance issue with this?

No. It's translating your query to the QueryDSL behind the scene and running it the same way you'd call the `_search` endpoint. I think the translation overhead is probably so minimal that you won't really see it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 29, 2019, 12:57pm UTC](https://discuss.elastic.co/t/can-we-use-elastic-sql-for-production-version-project-in-php/188316/3 "2019-07-29T12:57:49Z")

</div>

Closed on July 29, 2019, 12:57pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
