Search Postgresql Archives

Re: Python versus Other Languages using PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/08/2017 02:26 PM, Paul Hughes wrote:
Hello,

I noticed that most of the largest web platforms that use PostgreSQL as
their primary database, also use Python as their primary back-end
language. Yet, according to every benchmark I could find over the last
couple of years, back-end languages like PHP, HHVM, and Node.JS
outperform Python by 2x to 8x!

Postgres does not really care what you use to pull data from it. There are many libraries across many languages that you can use.


So here are my questions:

1) Why do the largest web applications that use PostgreSQL also use
Python, even though Python is significantly slower than it's biggest
competitors?

Because the Python code that does the SELECT * from some_table is not going to be the part that really determines performance. Performance is going to be dependent on well provisioned the database is and what you are using to display the data.


2) Can PostgreSQL just as easily be used with PHP or Node.js? If not,
why not?

See above.


3) Can PostgreSQL be made to work seamlessly to take advantage of the
superior performance of HHVM or Node.js?

A quick search on node.js Postgres found:

https://github.com/brianc/node-postgres

http://mherman.org/blog/2015/02/12/postgresql-and-nodejs/#.WRD1XK3TD4Y

php Postgres:

http://php.net/manual/en/book.pgsql.php

https://www.linkedin.com/pulse/how-make-postgresql-db-connections-php-j-c-thomas-rogers-iii



Thank you in advance!

~Paul

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
	Virus-free. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>


<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux