使用PHP连接到Columnar数据库。

时间:2022-07-22 09:46:27

SQL Server 2012 introduces a new index type called a column store index and new query operators that efficiently process batches of rows at a time. These two features together greatly improve the performance of typical data warehouse queries, in some cases by two orders of magnitude. This paper outlines the design of column store indexes and batch-mode processing and summarizes the key benefits this technology provides to customers. It also highlights some early customer experiences and feedback and briefly discusses future enhancements for column store indexes.

SQL Server 2012引入了一种新的索引类型,称为列存储索引和新的查询操作符,可以一次有效地处理多个行。这两个特性一起极大地提高了典型数据仓库查询的性能,在某些情况下是两个数量级。本文概述了列存储索引和批处理模式的设计,并总结了该技术为客户提供的主要优点。它还突出了一些早期客户体验和反馈,并简要讨论了对列存储索引的未来增强。

My Question is:

我的问题是:

Is there any way to connect PHP-Mysql demo to that type of db?

有没有什么方法可以将PHP-Mysql的demo连接到这类db上?

There is lot of engines "MySql Based" as follows

有很多的引擎“MySql”如下。

  • InfiniDB
  • InfiniDB
  • Infobright
  • Infobright
  • MonetDB
  • MonetDB
  • ... etc
  • …等

Is there any simple getting started with PHP-Mysql?

PHP-Mysql有什么简单的开始吗?

2 个解决方案

#1


3  

InfiniDB is a GPLv2 full open source MySQL wire compliant database. It uses the MySQL server as a frontend and the backend has been changed out and optimized for columnar storage. MyISAM and InnoDB tables are supported also, alongside the InfiniDB columnar tables. There is no limitations on the open source version and the enterprise support version. Use as many nodes and TB as you desire. If you are using MySQL now, you can drop in replace InfiniDB and should be able to connect through existing MySQL interfaces. Do recommend using the packaged cpimport utility of InfiniDB for loading data into the tables, it has been optimized for insertion into InfiniDB engine and is recommended to use instead of LOAD DATA.

InfiniDB是一个GPLv2完全开源的MySQL有线兼容数据库。它使用MySQL服务器作为前端,后端已经更改,并对柱状存储进行了优化。MyISAM和InnoDB表也被支持,与InfiniDB柱状表一起。开源版本和企业支持版本没有限制。尽可能多地使用节点和TB。如果您现在正在使用MySQL,那么您可以选择替换InfiniDB,并且应该能够通过现有的MySQL接口进行连接。建议使用InfiniDB的打包的cpimport实用程序将数据加载到表中,它已经优化了插入到InfiniDB引擎中,建议使用而不是加载数据。

btw, I am an architect for InfiniDB, so here is my bias, free to try, use and scale :)

顺便说一下,我是InfiniDB的建筑师,所以这里是我的偏见,可以*尝试,使用和缩放:)

Here is the example PHP from php.net running against my InfiniDB instance locally:

下面是php.net中的PHP示例,它在本地运行我的InfiniDB实例:

I changed in my php.ini to point to the mysql.sock in the InfiniDB install (I am running the PHP on the same server as the DB)

我在php中改变了。要指向mysql。sock在InfiniDB安装(我正在运行与DB相同的服务器上的PHP)

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-socket
mysql.default_socket = /usr/local/Calpont/mysql/lib/mysql/mysql.sock

Using this phptest.php (basically the copy from php.net with my own db and tables)

使用这个phptest。php(基本上是php.net的副本和我自己的db和表)

<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'root', '')
    or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('wide') or die('Could not select database');

// Performing SQL query
$query = 'SELECT count(*) FROM wide';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "\t<tr>\n";
    foreach ($line as $col_value) {
        echo "\t\t<td>$col_value</td>\n";
    }
    echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>

Then running:

然后运行:

[root@michael-vm2 tmp]# php phptest.php 
Connected successfully<table>
    <tr>
        <td>100000</td>
    </tr>
</table>

This is all off a stock install of InfiniDB. Just change your create statement to specify the engine=infinidb and you are good to go.

这都是在一个股票安装的InfiniDB。只需更改您的create语句来指定引擎=infinidb,您就可以运行了。

http://infinidb.co/

http://infinidb.co/

#2


-1  

Ok got an answer for you . I am a big fan of HP Vertica database, so i would recommend you use HP Vertica database if you want to make use of blazing speed.

好的,我有个答案。我是惠普Vertica数据库的忠实粉丝,所以如果你想要使用高速,我建议你使用惠普Vertica数据库。

Vertica is a Columnar Database that make full use of MPP,Data Compression, inline Clustering.
Is easy to install and maintain.
Fell free to bother me with Vertica related questions

Vertica是一个柱状数据库,充分利用MPP、数据压缩、内联聚类。易于安装和维护。我可以*地用与Vertica相关的问题来打扰我。

I suggest you install the CE(comunity edition) and test it , is easy to install and it's operation system are a joke ! kkk i mean it's nood type of database , it act on it's own.

我建议您安装CE(comunity edition)并测试它,很容易安装,而且它的操作系统是一个笑话!kkk是数据库的nood类型,它是自己的。

#1


3  

InfiniDB is a GPLv2 full open source MySQL wire compliant database. It uses the MySQL server as a frontend and the backend has been changed out and optimized for columnar storage. MyISAM and InnoDB tables are supported also, alongside the InfiniDB columnar tables. There is no limitations on the open source version and the enterprise support version. Use as many nodes and TB as you desire. If you are using MySQL now, you can drop in replace InfiniDB and should be able to connect through existing MySQL interfaces. Do recommend using the packaged cpimport utility of InfiniDB for loading data into the tables, it has been optimized for insertion into InfiniDB engine and is recommended to use instead of LOAD DATA.

InfiniDB是一个GPLv2完全开源的MySQL有线兼容数据库。它使用MySQL服务器作为前端,后端已经更改,并对柱状存储进行了优化。MyISAM和InnoDB表也被支持,与InfiniDB柱状表一起。开源版本和企业支持版本没有限制。尽可能多地使用节点和TB。如果您现在正在使用MySQL,那么您可以选择替换InfiniDB,并且应该能够通过现有的MySQL接口进行连接。建议使用InfiniDB的打包的cpimport实用程序将数据加载到表中,它已经优化了插入到InfiniDB引擎中,建议使用而不是加载数据。

btw, I am an architect for InfiniDB, so here is my bias, free to try, use and scale :)

顺便说一下,我是InfiniDB的建筑师,所以这里是我的偏见,可以*尝试,使用和缩放:)

Here is the example PHP from php.net running against my InfiniDB instance locally:

下面是php.net中的PHP示例,它在本地运行我的InfiniDB实例:

I changed in my php.ini to point to the mysql.sock in the InfiniDB install (I am running the PHP on the same server as the DB)

我在php中改变了。要指向mysql。sock在InfiniDB安装(我正在运行与DB相同的服务器上的PHP)

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
; http://www.php.net/manual/en/mysql.configuration.php#ini.mysql.default-socket
mysql.default_socket = /usr/local/Calpont/mysql/lib/mysql/mysql.sock

Using this phptest.php (basically the copy from php.net with my own db and tables)

使用这个phptest。php(基本上是php.net的副本和我自己的db和表)

<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'root', '')
    or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('wide') or die('Could not select database');

// Performing SQL query
$query = 'SELECT count(*) FROM wide';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "\t<tr>\n";
    foreach ($line as $col_value) {
        echo "\t\t<td>$col_value</td>\n";
    }
    echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>

Then running:

然后运行:

[root@michael-vm2 tmp]# php phptest.php 
Connected successfully<table>
    <tr>
        <td>100000</td>
    </tr>
</table>

This is all off a stock install of InfiniDB. Just change your create statement to specify the engine=infinidb and you are good to go.

这都是在一个股票安装的InfiniDB。只需更改您的create语句来指定引擎=infinidb,您就可以运行了。

http://infinidb.co/

http://infinidb.co/

#2


-1  

Ok got an answer for you . I am a big fan of HP Vertica database, so i would recommend you use HP Vertica database if you want to make use of blazing speed.

好的,我有个答案。我是惠普Vertica数据库的忠实粉丝,所以如果你想要使用高速,我建议你使用惠普Vertica数据库。

Vertica is a Columnar Database that make full use of MPP,Data Compression, inline Clustering.
Is easy to install and maintain.
Fell free to bother me with Vertica related questions

Vertica是一个柱状数据库,充分利用MPP、数据压缩、内联聚类。易于安装和维护。我可以*地用与Vertica相关的问题来打扰我。

I suggest you install the CE(comunity edition) and test it , is easy to install and it's operation system are a joke ! kkk i mean it's nood type of database , it act on it's own.

我建议您安装CE(comunity edition)并测试它,很容易安装,而且它的操作系统是一个笑话!kkk是数据库的nood类型,它是自己的。