Does TDengine support index on a normal table column? I know TDengine has a timestamp index for the first column. I want to filter according to a normal table column efficiently. Can I add an index on that column?
I think TDengine doesn't support index in 2.x versions. In later versions maybe inverted index will be added like ES.
Related
I used tdengine for a few weeks, since our table have more than 30 million record for a table, however I want to filter with a nchar column. I have built a cluster with three nodes. But the filter response speed is not as fast as MySQL.I thought that if I can create index on this column the speed will be faster. Since i filtered with timestamp which is the primary key and tdengine automatically create index on this column. So I want to ask if tdengine supports create index ? If so, how to create? Can some help?
TDengine not support create index on other columns till now.BUt it automatically create index for ts(the first column timestamp type). It will support create index on normal column in the furture.
I am using TDengine as my time-series storage engine and I want to change a column name of a super table. I tried to find a way in the official documents but I failed. Is there a way to change the column name of a super table?
Change column name is not supported in TDengine 2.x.
TDengine 2.x supports add a new column, drop an existing column, change column length for binary/nchar column.
No, I'm afraid not. Currently TDengine 2.x does not support column name changing. You can
Use alter to drop it and add a new column with the right name, but you may lost data.
Use select col as col2 to use as you have a column col2, but does not work in inserts.
I was reading about database partitioning from oracle documentation link(sales table). I got the concept that in range partitioning, you specify a column(or multiple columns) and give the corresponding range of values so that when you insert a value in table, it will go in related partitions making search efficient.
In the beginning of Range Partitioning section, it talks about the partitioning columns(sales_year, sales_month and sales_day) but those columns do not show in the create table statement. What exactly is partitioning columns? Are partitioning columns different from table columns?
No, partitioning columns are not different than table columns. I guess you are talking about the sale_year, sale_month, and sale_day columns in the documentation link.
I think that the example given in the link is incorrect. The partition is based on time_id and there are no sale_year, sale_month, and sale_day columns in the table. I think this piece of documentation is copy paste of older Oracle versions and not been updated appropriately in this case.
You can search for sale_year in the below links and find the correct example.
https://docs.oracle.com/cd/F49540_01/DOC/server.815/a67772/partiti.htm
https://books.google.co.in/books?id=z7UYI2-329MC&pg=PA462&lpg=PA462&dq=sale_year,+sale_month,+and+sale_day&source=bl&ots=j6_Pn7saNp&sig=YLwus8UqXzyhkG5_XxcY2wyV7kU&hl=en&sa=X&ved=0ahUKEwiOqPT3193MAhWBMI8KHUDPCCYQ6AEIGzAA#v=onepage&q=sale_year%2C%20sale_month%2C%20and%20sale_day&f=false
I have a question about using index in Oracle.
Suppose table has B tree index created on column columnA, which has high cardinality or unique.
This table has 1KK rows.
I make a query example where columnA like 'A%'
Suppose in this example this query will return me 90 percent of data.
So some questions:
Will oracle determine to use index or not?
If oracle will determine itself, what is the percentage value (example 50%) when oracle will use index. Example 30% use index, 40% will not use? And when I would benefit from using indexes.
Can I force oracle to use index or not depending on query myself.
Thanks in advance.
I have a SOLR instance that is updated using deltaQuery/deltaImportQuery.
There is a row in SOLR that was changed in the source database table since last SOLR update.
During the next update deltaQuery returns primary key of this row (because it was changed recently). deltaImportQuery should select data for the particular primary key. This query contains additional filter on some field like IsSearchableItem=1 (I don't want to make searchable some rows).
So, deltaImportQuery does not return any data for the row (this particular row IsSearchable=0). Will this row be removed from SOLR index in this case?
I believe if DIH does not generate a replacement document (I think what you call row), it will not get deleted. Instead, you could look at checking for using $deleteDocById when IsSearchableItem is 1. Check $skipDoc usage in Wikipedia dump example.
Or use deletedPkQuery.